alibi_sqlx/store/entities/
team.rs1use chrono::{DateTime, Utc};
2
3#[derive(Clone, Debug, PartialEq, Eq, sqlx::FromRow, crate::SqlxModel)]
4#[auth(table = "team")]
5pub struct Model {
6 pub id: String,
7 pub name: String,
8 pub organization_id: String,
9 pub member_count: i64,
10 pub created_at: DateTime<Utc>,
11 pub updated_at: Option<DateTime<Utc>>,
12}
13
14impl From<Model> for alibi_core::types::Team {
15 fn from(model: Model) -> Self {
16 Self {
17 id: model.id,
18 name: model.name,
19 organization_id: model.organization_id,
20 member_count: model.member_count,
21 created_at: model.created_at,
22 updated_at: model.updated_at,
23 }
24 }
25}