646 lines
18 KiB
Python
646 lines
18 KiB
Python
![]() |
from pydantic import BaseModel
|
|||
|
from typing import Optional
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersBase(BaseModel):
|
|||
|
owner_uid: int
|
|||
|
groupid: int
|
|||
|
founder_groupid: int
|
|||
|
username: str
|
|||
|
password: str
|
|||
|
salt: str
|
|||
|
type: int
|
|||
|
status: int
|
|||
|
joindate: int
|
|||
|
joinip: str
|
|||
|
lastvisit: int
|
|||
|
lastip: str
|
|||
|
remark: str
|
|||
|
starttime: int
|
|||
|
endtime: int
|
|||
|
register_type: int
|
|||
|
openid: str
|
|||
|
welcome_link: int
|
|||
|
notice_setting: str
|
|||
|
is_bind: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersCreate(ImsUsersBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users记录:
|
|||
|
- 继承自ImsUsersBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
owner_uid: Optional[int]
|
|||
|
groupid: Optional[int]
|
|||
|
founder_groupid: Optional[int]
|
|||
|
username: Optional[str]
|
|||
|
password: Optional[str]
|
|||
|
salt: Optional[str]
|
|||
|
type: Optional[int]
|
|||
|
status: Optional[int]
|
|||
|
joindate: Optional[int]
|
|||
|
joinip: Optional[str]
|
|||
|
lastvisit: Optional[int]
|
|||
|
lastip: Optional[str]
|
|||
|
remark: Optional[str]
|
|||
|
starttime: Optional[int]
|
|||
|
endtime: Optional[int]
|
|||
|
register_type: Optional[int]
|
|||
|
openid: Optional[str]
|
|||
|
welcome_link: Optional[int]
|
|||
|
notice_setting: Optional[str]
|
|||
|
is_bind: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsers(ImsUsersBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users记录:
|
|||
|
- uid: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersBindBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersBindBase(BaseModel):
|
|||
|
uid: int
|
|||
|
bind_sign: str
|
|||
|
third_type: int
|
|||
|
third_nickname: str
|
|||
|
|
|||
|
|
|||
|
class ImsUsersBindCreate(ImsUsersBindBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_bind记录:
|
|||
|
- 继承自ImsUsersBindBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersBindUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_bind记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
bind_sign: Optional[str]
|
|||
|
third_type: Optional[int]
|
|||
|
third_nickname: Optional[str]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersBind(ImsUsersBindBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_bind记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersCreateGroupBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersCreateGroupBase(BaseModel):
|
|||
|
group_name: str
|
|||
|
maxaccount: int
|
|||
|
maxwxapp: int
|
|||
|
maxwebapp: int
|
|||
|
maxphoneapp: int
|
|||
|
maxxzapp: int
|
|||
|
maxaliapp: int
|
|||
|
createtime: int
|
|||
|
maxbaiduapp: int
|
|||
|
maxtoutiaoapp: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersCreateGroupCreate(ImsUsersCreateGroupBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_create_group记录:
|
|||
|
- 继承自ImsUsersCreateGroupBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersCreateGroupUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_create_group记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
group_name: Optional[str]
|
|||
|
maxaccount: Optional[int]
|
|||
|
maxwxapp: Optional[int]
|
|||
|
maxwebapp: Optional[int]
|
|||
|
maxphoneapp: Optional[int]
|
|||
|
maxxzapp: Optional[int]
|
|||
|
maxaliapp: Optional[int]
|
|||
|
createtime: Optional[int]
|
|||
|
maxbaiduapp: Optional[int]
|
|||
|
maxtoutiaoapp: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersCreateGroup(ImsUsersCreateGroupBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_create_group记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersGroupBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersGroupBase(BaseModel):
|
|||
|
owner_uid: int
|
|||
|
name: str
|
|||
|
package: str
|
|||
|
maxaccount: int
|
|||
|
timelimit: int
|
|||
|
maxwxapp: int
|
|||
|
maxwebapp: int
|
|||
|
maxphoneapp: int
|
|||
|
maxxzapp: int
|
|||
|
maxaliapp: int
|
|||
|
maxbaiduapp: int
|
|||
|
maxtoutiaoapp: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersGroupCreate(ImsUsersGroupBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_group记录:
|
|||
|
- 继承自ImsUsersGroupBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersGroupUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_group记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
owner_uid: Optional[int]
|
|||
|
name: Optional[str]
|
|||
|
package: Optional[str]
|
|||
|
maxaccount: Optional[int]
|
|||
|
timelimit: Optional[int]
|
|||
|
maxwxapp: Optional[int]
|
|||
|
maxwebapp: Optional[int]
|
|||
|
maxphoneapp: Optional[int]
|
|||
|
maxxzapp: Optional[int]
|
|||
|
maxaliapp: Optional[int]
|
|||
|
maxbaiduapp: Optional[int]
|
|||
|
maxtoutiaoapp: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersGroup(ImsUsersGroupBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_group记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersInvitation
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersExtraGroupBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersExtraGroupBase(BaseModel):
|
|||
|
uid: int
|
|||
|
uni_group_id: int
|
|||
|
create_group_id: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraGroupCreate(ImsUsersExtraGroupBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_extra_group记录:
|
|||
|
- 继承自ImsUsersExtraGroupBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraGroupUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_extra_group记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
uni_group_id: Optional[int]
|
|||
|
create_group_id: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraGroup(ImsUsersExtraGroupBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_extra_group记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersExtraLimitBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersExtraLimitBase(BaseModel):
|
|||
|
uid: int
|
|||
|
maxaccount: int
|
|||
|
maxwxapp: int
|
|||
|
maxwebapp: int
|
|||
|
maxphoneapp: int
|
|||
|
maxxzapp: int
|
|||
|
maxaliapp: int
|
|||
|
timelimit: int
|
|||
|
maxbaiduapp: int
|
|||
|
maxtoutiaoapp: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraLimitCreate(ImsUsersExtraLimitBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_extra_limit记录:
|
|||
|
- 继承自ImsUsersExtraLimitBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraLimitUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_extra_limit记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
maxaccount: Optional[int]
|
|||
|
maxwxapp: Optional[int]
|
|||
|
maxwebapp: Optional[int]
|
|||
|
maxphoneapp: Optional[int]
|
|||
|
maxxzapp: Optional[int]
|
|||
|
maxaliapp: Optional[int]
|
|||
|
timelimit: Optional[int]
|
|||
|
maxbaiduapp: Optional[int]
|
|||
|
maxtoutiaoapp: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraLimit(ImsUsersExtraLimitBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_extra_limit记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersExtraModulesBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersExtraModulesBase(BaseModel):
|
|||
|
uid: int
|
|||
|
module_name: str
|
|||
|
support: str
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraModulesCreate(ImsUsersExtraModulesBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_extra_modules记录:
|
|||
|
- 继承自ImsUsersExtraModulesBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraModulesUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_extra_modules记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
module_name: Optional[str]
|
|||
|
support: Optional[str]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraModules(ImsUsersExtraModulesBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_extra_modules记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersExtraTemplatesBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersExtraTemplatesBase(BaseModel):
|
|||
|
uid: int
|
|||
|
template_id: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraTemplatesCreate(ImsUsersExtraTemplatesBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_extra_templates记录:
|
|||
|
- 继承自ImsUsersExtraTemplatesBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraTemplatesUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_extra_templates记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
template_id: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersExtraTemplates(ImsUsersExtraTemplatesBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_extra_templates记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFailedLoginBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFailedLoginBase(BaseModel):
|
|||
|
ip: str
|
|||
|
username: str
|
|||
|
count: int
|
|||
|
lastupdate: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFailedLoginCreate(ImsUsersFailedLoginBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_failed_login记录:
|
|||
|
- 继承自ImsUsersFailedLoginBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFailedLoginUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_failed_login记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
ip: Optional[str]
|
|||
|
username: Optional[str]
|
|||
|
count: Optional[int]
|
|||
|
lastupdate: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFailedLogin(ImsUsersFailedLoginBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_failed_login记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFounderGroupBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFounderGroupBase(BaseModel):
|
|||
|
name: str
|
|||
|
package: str
|
|||
|
maxaccount: int
|
|||
|
timelimit: int
|
|||
|
maxwxapp: int
|
|||
|
maxwebapp: int
|
|||
|
maxphoneapp: int
|
|||
|
maxxzapp: int
|
|||
|
maxaliapp: int
|
|||
|
maxbaiduapp: int
|
|||
|
maxtoutiaoapp: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderGroupCreate(ImsUsersFounderGroupBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_founder_group记录:
|
|||
|
- 继承自ImsUsersFounderGroupBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderGroupUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_founder_group记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
name: Optional[str]
|
|||
|
package: Optional[str]
|
|||
|
maxaccount: Optional[int]
|
|||
|
timelimit: Optional[int]
|
|||
|
maxwxapp: Optional[int]
|
|||
|
maxwebapp: Optional[int]
|
|||
|
maxphoneapp: Optional[int]
|
|||
|
maxxzapp: Optional[int]
|
|||
|
maxaliapp: Optional[int]
|
|||
|
maxbaiduapp: Optional[int]
|
|||
|
maxtoutiaoapp: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderGroup(ImsUsersFounderGroupBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_founder_group记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFounderOwnCreateGroupsBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFounderOwnCreateGroupsBase(BaseModel):
|
|||
|
founder_uid: int
|
|||
|
create_group_id: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnCreateGroupsCreate(ImsUsersFounderOwnCreateGroupsBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_founder_own_create_groups记录:
|
|||
|
- 继承自ImsUsersFounderOwnCreateGroupsBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnCreateGroupsUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_founder_own_create_groups记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
founder_uid: Optional[int]
|
|||
|
create_group_id: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnCreateGroups(ImsUsersFounderOwnCreateGroupsBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_founder_own_create_groups记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFounderOwnUniGroupsBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFounderOwnUniGroupsBase(BaseModel):
|
|||
|
founder_uid: int
|
|||
|
uni_group_id: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUniGroupsCreate(ImsUsersFounderOwnUniGroupsBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_founder_own_uni_groups记录:
|
|||
|
- 继承自ImsUsersFounderOwnUniGroupsBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUniGroupsUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_founder_own_uni_groups记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
founder_uid: Optional[int]
|
|||
|
uni_group_id: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUniGroups(ImsUsersFounderOwnUniGroupsBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_founder_own_uni_groups记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFounderOwnUsersBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFounderOwnUsersBase(BaseModel):
|
|||
|
uid: int
|
|||
|
founder_uid: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsersCreate(ImsUsersFounderOwnUsersBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_founder_own_users记录:
|
|||
|
- 继承自ImsUsersFounderOwnUsersBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsersUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_founder_own_users记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
uid: Optional[int]
|
|||
|
founder_uid: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsers(ImsUsersFounderOwnUsersBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_founder_own_users记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|
|||
|
|
|||
|
|
|||
|
# 数据模型基类: ImsUsersFounderOwnUsersGroupsBase,用于描述基础字段的类型、用途和注意点
|
|||
|
class ImsUsersFounderOwnUsersGroupsBase(BaseModel):
|
|||
|
founder_uid: int
|
|||
|
users_group_id: int
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsersGroupsCreate(ImsUsersFounderOwnUsersGroupsBase):
|
|||
|
"""
|
|||
|
用于创建新的ims_users_founder_own_users_groups记录:
|
|||
|
- 继承自ImsUsersFounderOwnUsersGroupsBase,不额外添加字段
|
|||
|
- 仅表示此Schema专用于'创建'场景
|
|||
|
"""
|
|||
|
pass
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsersGroupsUpdate(BaseModel):
|
|||
|
"""
|
|||
|
用于更新已有ims_users_founder_own_users_groups记录:
|
|||
|
- 只包含可选字段,未在此处的内容将保持不变
|
|||
|
- 注意: exclude_unset=True 可以避免更新空值
|
|||
|
"""
|
|||
|
founder_uid: Optional[int]
|
|||
|
users_group_id: Optional[int]
|
|||
|
|
|||
|
|
|||
|
class ImsUsersFounderOwnUsersGroups(ImsUsersFounderOwnUsersGroupsBase):
|
|||
|
"""
|
|||
|
表示完整的ims_users_founder_own_users_groups记录:
|
|||
|
- id: 数据库主键ID
|
|||
|
- 包含所有字段的最终模型,ORM转换时使用
|
|||
|
"""
|
|||
|
acid: int # 表中的主键ID
|
|||
|
|
|||
|
class Config:
|
|||
|
orm_mode = True
|