use crate::{DateTimeUtc, IssueId, RepoId};
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "issue_pull_request")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub issue: IssueId,
    #[sea_orm(primary_key)]
    pub repo: RepoId,
    #[sea_orm(primary_key)]
    pub number: i64,
    pub relation_at: DateTimeUtc,
}

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

impl ActiveModelBehavior for ActiveModel {}
