from snek.system.model import BaseModel, ModelField


class ChannelAttachmentModel(BaseModel):

    name = ModelField(name="name", required=True, kind=str)
    channel_uid = ModelField(name="channel_uid", required=True, kind=str)
    path = ModelField(name="path", required=True, kind=str)
    size = ModelField(name="size", required=False, kind=int)
    user_uid = ModelField(name="user_uid", required=True, kind=str)
    mime_type = ModelField(name="type", required=True, kind=str)
    relative_url = ModelField(name="relative_url", required=True, kind=str)
    resource_type = ModelField(
        name="resource_type", required=True, kind=str, value="file"
    )
