main
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "repo_release")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
#[sea_orm(unique_key = "repo_tag")]
pub repo_id: Uuid,
pub publisher_id: i64,
pub publisher_name: String,
pub tag_name: String,
#[sea_orm(unique_key = "repo_tag")]
pub lower_tag_name: String,
pub target: String,
pub title: String,
pub content: Option<String>,
pub sha: String,
pub num_commits: i32,
pub is_draft: bool,
pub is_prerelease: bool,
pub is_tag: bool,
pub created_at: OffsetDateTime,
pub updated_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "repo_id", to = "id")]
pub repo: BelongsTo<super::repos::Entity>,
#[sea_orm(belongs_to, from = "publisher_id", to = "uid")]
pub publisher: BelongsTo<super::super::users::user::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}