flix_db/entity/watched/
shows.rs1use flix_model::id::{RawId, ShowId};
4
5use chrono::NaiveDate;
6use sea_orm::{
7 ActiveModelBehavior, DeriveEntityModel, DerivePrimaryKey, DeriveRelation, EntityTrait,
8 EnumIter, PrimaryKeyTrait,
9};
10
11#[derive(Debug, Clone, DeriveEntityModel)]
13#[sea_orm(table_name = "flix_watched_shows")]
14pub struct Model {
15 #[sea_orm(primary_key, auto_increment = false)]
17 pub id: ShowId,
18 #[sea_orm(primary_key, auto_increment = false)]
20 pub user_id: RawId,
21 pub watched_date: NaiveDate,
23}
24
25impl ActiveModelBehavior for ActiveModel {}
26
27#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
29pub enum Relation {}