service_contracts/
service_player.rs1use mahjong_core::{GameId, PlayerId};
2use serde::{Deserialize, Serialize};
3use ts_rs::TS;
4
5#[derive(Debug, Clone, Serialize, Deserialize, Default, TS)]
6#[ts(export)]
7pub struct ServicePlayer {
8 pub created_at: String,
9 pub id: PlayerId,
10 pub is_ai: bool,
11 pub name: String,
12}
13
14#[derive(Debug, Clone, Serialize, Deserialize, Default, TS)]
15#[ts(export)]
16pub struct ServicePlayerGame {
17 pub created_at: String,
18 pub id: GameId,
19 pub updated_at: String,
20}
21
22#[derive(Debug, Clone, Serialize, Deserialize, TS)]
23#[ts(export)]
24pub struct ServicePlayerSummary {
25 pub id: PlayerId,
26 pub name: String,
27}