feat(domain): add WrapUpRecord, WrapUpRepository port
This commit is contained in:
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user