from datetime import datetime
from typing import Optional

from fastapi import APIRouter
from sqlmodel import Field, SQLModel

router = APIRouter()


class Right(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Province(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Amphoe(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    province_id: int
    name: str


class Tambon(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    amphoe_id: int
    name: str


class Religion(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class National(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Occupation(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class MaritalStatus(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class AcademicDegree(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Allergy(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Vehicle(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Language(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Relationship(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class IdType(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class FeedbackType(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class VisibilityLevel(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str


class Module(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    detail: str
    created_at: datetime
    updated_at: datetime
    created_by: int
    updated_by: Optional[int] = None


class ModuleFunction(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    detail: str
    created_at: datetime
    updated_at: datetime
    created_by: int
    updated_by: Optional[int] = None

fastapi.APIRouter sqlmodel.Field
[((136, 147), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (145, 147), False, 'from fastapi import APIRouter\n'), ((209, 246), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (214, 246), False, 'from sqlmodel import Field, SQLModel\n'), ((325, 362), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (330, 362), False, 'from sqlmodel import Field, SQLModel\n'), ((439, 476), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (444, 476), False, 'from sqlmodel import Field, SQLModel\n'), ((574, 611), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (579, 611), False, 'from sqlmodel import Field, SQLModel\n'), ((709, 746), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (714, 746), False, 'from sqlmodel import Field, SQLModel\n'), ((825, 862), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (830, 862), False, 'from sqlmodel import Field, SQLModel\n'), ((943, 980), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (948, 980), False, 'from sqlmodel import Field, SQLModel\n'), ((1064, 1101), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1069, 1101), False, 'from sqlmodel import Field, SQLModel\n'), ((1186, 1223), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1191, 1223), False, 'from sqlmodel import Field, SQLModel\n'), ((1301, 1338), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1306, 1338), False, 'from sqlmodel import Field, SQLModel\n'), ((1416, 1453), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1421, 1453), False, 'from sqlmodel import Field, SQLModel\n'), ((1532, 1569), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1537, 1569), False, 'from sqlmodel import Field, SQLModel\n'), ((1652, 1689), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1657, 1689), False, 'from sqlmodel import Field, SQLModel\n'), ((1766, 1803), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1771, 1803), False, 'from sqlmodel import Field, SQLModel\n'), ((1886, 1923), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (1891, 1923), False, 'from sqlmodel import Field, SQLModel\n'), ((2009, 2046), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (2014, 2046), False, 'from sqlmodel import Field, SQLModel\n'), ((2123, 2160), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (2128, 2160), False, 'from sqlmodel import Field, SQLModel\n'), ((2368, 2405), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (2373, 2405), False, 'from sqlmodel import Field, SQLModel\n')]