use crate::{DateTimeUtc, ProjectId, UserId};
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "project_board_card")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: Uuid,
    #[sea_orm(column_name = "column_uuid")]
    pub column: Uuid,
    pub issue_id: Option<i64>,
    pub project: Option<ProjectId>,
    pub title: String,
    pub description: Option<String>,
    pub position: i32,
    pub assignee_id: Option<UserId>,
    pub due_date: Option<DateTimeUtc>,
    pub priority: Option<String>,
    pub created_by: UserId,
    pub created_at: DateTimeUtc,
    pub updated_at: DateTimeUtc,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}
