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

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "repo_fork")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i64,
    pub parent_repo: RepoId,
    pub forked_repo: RepoId,
    pub forked_by: UserId,
    pub forked_at: DateTimeUtc,
}

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

impl ActiveModelBehavior for ActiveModel {}
