2020-12-16 00:31:30 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: media_attachment_albums
|
|
|
|
#
|
|
|
|
# id :bigint(8) not null, primary key
|
|
|
|
# title :text default(""), not null
|
|
|
|
# description :text
|
|
|
|
# account_id :integer not null
|
|
|
|
# visibility :integer default("public"), not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# cover_id :bigint(8)
|
2020-12-18 04:46:37 +00:00
|
|
|
# count :integer default(0), not null
|
2020-12-16 00:31:30 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
class MediaAttachmentAlbum < ApplicationRecord
|
|
|
|
|
2020-12-22 17:11:22 +00:00
|
|
|
include Paginable
|
|
|
|
|
2020-12-16 00:31:30 +00:00
|
|
|
enum visibility: [
|
|
|
|
:public,
|
|
|
|
:private,
|
|
|
|
], _suffix: :visibility
|
|
|
|
|
|
|
|
belongs_to :account
|
2020-12-22 17:11:22 +00:00
|
|
|
belongs_to :cover, class_name: 'MediaAttachment', optional: true
|
2020-12-16 00:31:30 +00:00
|
|
|
|
|
|
|
end
|