a06673b
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "user_agreement_acceptances")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub user_id: Uuid,
#[sea_orm(belongs_to, from = "user_id", to = "uid")]
pub user: BelongsTo<crate::user::users::Entity>,
#[sea_orm(unique_key = "agreement_acceptance")]
pub agreement_key: String,
#[sea_orm(unique_key = "agreement_acceptance")]
pub agreement_version: String,
pub accepted_at: OffsetDateTime,
}
impl ActiveModelBehavior for ActiveModel {}