1use chrono::{DateTime, Utc};
2use serde::{Deserialize, Serialize};
3use uuid::Uuid;
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct Dataset {
7 pub id: Uuid,
8 pub name: String,
9 pub owner_id: Uuid,
10 pub tenant_id: Option<Uuid>,
11 pub created_at: DateTime<Utc>,
12 pub updated_at: Option<DateTime<Utc>>,
13}
14
15impl Dataset {
16 pub fn new(name: String, owner_id: Uuid, tenant_id: Option<Uuid>, id: Uuid) -> Self {
21 Self {
22 id,
23 name,
24 owner_id,
25 tenant_id,
26 created_at: Utc::now(),
27 updated_at: None,
28 }
29 }
30}