import uuid
from pydantic import BaseModel

from domains.groups.models import GroupType, GroupMemberRole

class GroupCreate(BaseModel):
    name: str

class GroupResponse(BaseModel):
    id: uuid.UUID
    name: str
    type: GroupType
    is_active: bool

    class Config:
        from_attributes = True

class AddMemberRequest(BaseModel):
    username: str # Req 12 says user enters username

class GroupMemberResponse(BaseModel):
    user_id: uuid.UUID
    username: str
    role: GroupMemberRole
    is_online: bool = False

    class Config:
        from_attributes = True