flix_db/entity/watched/
collections.rs

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