// fe/src/types/group.ts
import type { AuthState } from '@/stores/auth';
import type { ChoreHistory } from './chore';
import type { UserPublic } from './user';

export interface Group {
    id: number;
    name: string;
    created_by_id: number;
    created_at: string;
    members: AuthState['user'][];
    chore_history?: ChoreHistory[];
}

export interface GroupCreate {
    name: string;
    description?: string;
}

export interface GroupUpdate {
    name?: string;
    description?: string;
}

export interface GroupPublic {
    id: number;
    name: string;
    description?: string | null;
    created_by_id: number;
    created_at: string;
    creator?: UserPublic;
    members: UserPublic[];
    is_member?: boolean;
}
