attributes do
uuid_primary_key :id
attribute :title, :string do
allow_nil? false
end
attribute :slug, :string do
allow_nil? false
end
attribute :content, :string do
allow_nil? false
end
create_timestamp(:inserted_at)
update_timestamp(:updated_at)
end
relationships do
belongs_to :site, MyApp.Sites.Site
end
identities do
identity :slug_site, [:slug, :site]
end
attributes do
uuid_primary_key :id
attribute :title, :string do
allow_nil? false
end
attribute :slug, :string do
allow_nil? false
end
attribute :content, :string do
allow_nil? false
end
create_timestamp(:inserted_at)
update_timestamp(:updated_at)
end
relationships do
belongs_to :site, MyApp.Sites.Site
end
identities do
identity :slug_site, [:slug, :site]
end