flix_db/entity/info/
collections.rs

1//! Collection entity
2
3use flix_model::id::CollectionId;
4
5use sea_orm::{
6	ActiveModelBehavior, DeriveEntityModel, DerivePrimaryKey, DeriveRelation, EntityTrait,
7	EnumIter, PrimaryKeyTrait,
8};
9
10/// The database representation of a flix collection
11#[derive(Debug, Clone, DeriveEntityModel)]
12#[sea_orm(table_name = "flix_info_collections")]
13pub struct Model {
14	/// The collection's ID
15	#[sea_orm(primary_key, auto_increment = false)]
16	pub id: CollectionId,
17	/// The collection's title
18	pub title: String,
19	/// The collection's overview
20	pub overview: String,
21}
22
23impl ActiveModelBehavior for ActiveModel {}
24
25/// Relation
26#[derive(Debug, EnumIter, DeriveRelation)]
27pub enum Relation {}