feat(domain): add WrapUpRecord, WrapUpRepository port

This commit is contained in:
2026-06-02 21:59:47 +02:00
parent 4c75113c4f
commit a95d831fd1
4 changed files with 191 additions and 6 deletions

View File

@@ -1,6 +1,8 @@
use chrono::NaiveDate;
use chrono::{NaiveDate, NaiveDateTime};
use uuid::Uuid;
use crate::value_objects::WrapUpId;
#[derive(Clone, Debug)]
pub struct DateRange {
pub start: NaiveDate,
@@ -117,3 +119,24 @@ pub struct WrapUpReport {
pub poster_paths: Vec<String>,
pub top_cast_profile_paths: Vec<String>,
}
#[derive(Clone, Debug, PartialEq)]
pub enum WrapUpStatus {
Pending,
Generating,
Ready,
Failed,
}
#[derive(Clone, Debug)]
pub struct WrapUpRecord {
pub id: WrapUpId,
pub user_id: Option<Uuid>,
pub start_date: NaiveDate,
pub end_date: NaiveDate,
pub status: WrapUpStatus,
pub report_json: Option<String>,
pub error_message: Option<String>,
pub created_at: NaiveDateTime,
pub completed_at: Option<NaiveDateTime>,
}