37 lines
839 B
Ruby
37 lines
839 B
Ruby
class Domain::Inkbunny::Post < ReduxApplicationRecord
|
|
self.table_name = "domain_inkbunny_posts"
|
|
include HasIndexedPost
|
|
|
|
belongs_to :creator,
|
|
class_name: "::Domain::Inkbunny::User",
|
|
inverse_of: :posts
|
|
|
|
has_many :files, class_name: "::Domain::Inkbunny::File", inverse_of: :post
|
|
|
|
enum :state, %i[ok error]
|
|
enum :rating, %i[general mature adult]
|
|
enum :submission_type,
|
|
%i[
|
|
unknown
|
|
picture_pinup
|
|
sketch
|
|
picture_series
|
|
comic
|
|
portfolio
|
|
flash_animation
|
|
flash_interactive
|
|
video_feature
|
|
video_animation
|
|
music_single
|
|
music_album
|
|
writing_document
|
|
character_sheet
|
|
photography
|
|
]
|
|
|
|
after_initialize do
|
|
self.state ||= :ok
|
|
self.state_detail ||= {}
|
|
end
|
|
end
|