use sqlx::{ prelude::FromRow, types::{ Uuid, chrono::{DateTime, Utc}, }, }; #[derive(Debug, FromRow)] pub struct Organization { pub id: Uuid, pub name: String, pub slug: String, pub created_at: DateTime, pub updated_at: DateTime, } #[derive(sqlx::Type, Debug, Clone, PartialEq)] #[sqlx(type_name = "org_role", rename_all = "lowercase")] pub enum OrgRole { Owner, Admin, Member, Viewer, } #[derive(Debug, FromRow)] pub struct OrgMember { pub user_id: Uuid, pub org_id: Uuid, pub role: OrgRole, pub created_at: DateTime, pub updated_at: DateTime, }