Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distrinct ¶
type Distrinct struct { ID int `db:"column:id;type:smallint"` Name string `db:"column:name;type:varchar(100)"` ParentID int `db:"column:parent_id;type:smallint"` Initial string `db:"column:initial;type:varchar(100)"` Initials string `db:"column:initials;type:varchar(100)"` Pinyin string `db:"column:pinyin;type:varchar(100)"` Extra string `db:"column:extra;type:varchar(100)"` Suffix string `db:"column:suffix;type:varchar(100)"` Code string `db:"column:code;type:varchar(100)"` AreaCode string `db:"column:area_code;type:varchar(100)"` Order int `db:"column:order;type:int"` }
func (*Distrinct) TableComment ¶
type Navigation ¶
type Navigation struct {}
func (*Navigation) TableComment ¶
func (u *Navigation) TableComment() string
func (*Navigation) TableName ¶
func (u *Navigation) TableName() string
type OrgType ¶
type OrgType int32
const ( CentralOrg OrgType //1 中心机构 CityOrg //2 市级机构 CountryOrg //3 县级机构 UrbanOrg //4 社区机构 )
type Organization ¶
type Organization struct { OrgID int64 `db:"column:机构ID;type:bigint(22);is not null;primarykey;"` OrgName string `db:"column:机构名称;type:varchar(64);"` OrgParentID int64 `db:"column:父机构名称;type:bigint(22)"` Comment string `db:"column:描述;type:varchar(2560)"` OrgOutID string `db:"column:惠宜康机构ID;type:varchar(255)"` OrgType OrgType `db:"column:机构类型;type:int;"` ProvinceID int `db:"column:省份ID;type:smallint"` ProvinceName string `db:"column:省份名;type:varchar(200)"` CityID int `db:"column:城市ID;type:smallint"` CityName string `db:"column:城市名;type:varchar(200)"` CountryID int `db:"column:区ID;type:smallint"` CountryName string `db:"column:区名;type:varchar(200)"` Address string `db:"column:具体地址;type:varchar(1000)"` Abbr string `db:"column:拼音缩写;type:varchar(55)"` //ContactName string `db:"column:联系人;type:v"` Users []*User `db:"-"` }
func (*Organization) TableComment ¶
func (o *Organization) TableComment() string
func (*Organization) TableName ¶
func (o *Organization) TableName() string
type Role ¶
type Role struct { ID int64 `db:"column:ID;type:bigint(22);comment:主键,唯一ID;is not null;primarykey;"` CreatedBy string `db:"column:创建人;type:varchar(50);"` CreatedAt *time.Time `db:"column:创建时间;type:datetime;"` UpdatedBy string `db:"column:修改人;type:varchar(50);"` UpdatedAt *time.Time `db:"column:修改时间;type:datetime;"` DeletedBy string `db:"column:删除人;type:varchar(50);"` DeletedAt *time.Time `db:"column:删除时间;type:datetime;"` RoleName string `db:"column:角色名;type:varchar(30);"` Status Status `db:"column:状态;type:int(2);"` RoleType RoleType `db:"column:角色类型;type:tinyint;"` Abbr string `db:"column:中文首拼;type:varchar(25);"` }
func (*Role) TableComment ¶
type RoleNavBind ¶
type RoleNavBind struct {}
func (*RoleNavBind) TableComment ¶
func (u *RoleNavBind) TableComment() string
func (*RoleNavBind) TableName ¶
func (u *RoleNavBind) TableName() string
type User ¶
type User struct { ID int64 `db:"column:ID;type:bigint(22);comment:主键,唯一ID;is not null;primarykey;"` HYCUserID string `db:"column:惠宜康用户ID;type:varchar(255);comment:惠宜康用户的ID"` UserID string `db:"column:用户账号;type:varchar(255);comment:用户ID;is not null"` UserName string `db:"column:用户昵称;type:varchar(255);comment:用户昵称;is not null"` UserRealName string `db:"column:用户姓名;type:varchar(25);comment:用户真实姓名"` Password string `db:"column:密码;type:varchar(255);comment:密码;"` IDCard string `db:"column:身份证;type:varchar(255);comment:身份证"` Phone string `db:"Column:手机号;type:varchar(32);comment:手机号码"` Birthday *time.Time `db:"Column:生日日期;type:datetime;comment:生日日期"` Email string `db:"Column:邮件;type:varchar(255);comment:邮件地址"` QQ string `db:"Column:qq;comment:QQ号码;type:varchar(30)"` Wechat string `db:"Column:微信号;comment:微信号码;type:varchar(20)"` AvatarURL string `db:"Column:头像;comment:头像URL;type:varchar(2560)"` Comments string `db:"Column:备注;comment:备注;type:varchar(2560);"` //备注 Abbr string `db:"Column:拼音首字母;type:varchar(25);"` IsVerify VerifyStatus `db:"column:用户是否审核;type:tinyint;comment:用户审核状态,用于判断用户的审核状态"` CreatedBy string `db:"column:创建人;type:varchar(50);"` CreatedAt *time.Time `db:"column:创建时间;type:datetime;"` UpdatedBy string `db:"column:修改人;type:varchar(50);"` UpdatedAt *time.Time `db:"column:修改时间;type:datetime;"` DeletedBy string `db:"column:删除人;type:varchar(50);"` DeletedAt *time.Time `db:"column:删除时间;type:datetime;"` RoleBinds []*UserRoleBind `db:"-"` Org *Organization `db:"-"` Roles []*Role `db:"-"` }
func (*User) HashPassword ¶
HashPassword 将密码转为Hash并且存储起来
func (*User) TableComment ¶
func (*User) VerifyPassword ¶
VerifyPassword 验证password是否正确
type UserOrgBind ¶
type UserOrgBind struct { CreatedBy string `db:"column:创建人;type:varchar(50);"` CreatedAt *time.Time `db:"column:创建时间;type:datetime;"` UpdatedBy string `db:"column:修改人;type:varchar(50);"` UpdatedAt *time.Time `db:"column:修改时间;type:datetime;"` DeletedBy string `db:"column:删除人;type:varchar(50);"` DeletedAt *time.Time `db:"column:删除时间;type:datetime;"` ID int64 `db:"column:ID;type:bigint(22);comment:主键,唯一ID;is not null;primarykey;"` OrgID int64 `db:"column:机构ID;type:bigint(22);comment:外键,机构ID;is not null;"` UserID int64 `db:"column:用户ID;type:bigint(22);comment:外键,用户ID;is not null;"` }
func (*UserOrgBind) TableComment ¶
func (u *UserOrgBind) TableComment() string
func (*UserOrgBind) TableName ¶
func (u *UserOrgBind) TableName() string
type UserRoleBind ¶
type UserRoleBind struct { CreatedBy string `db:"column:创建人;type:varchar(50);"` CreatedAt *time.Time `db:"column:创建时间;type:datetime;"` UpdatedBy string `db:"column:修改人;type:varchar(50);"` UpdatedAt *time.Time `db:"column:修改时间;type:datetime;"` DeletedBy string `db:"column:删除人;type:varchar(50);"` DeletedAt *time.Time `db:"column:删除时间;type:datetime;"` ID int64 `db:"column:ID;type:bigint(22);comment:主键,唯一ID;is not null;primarykey;"` RoleID int64 `db:"column:角色ID;type:bigint(22);comment:外键,角色ID;is not null;"` UserID int64 `db:"column:用户ID;type:bigint(22);comment:外键,用户ID;is not null;"` Role *Role `db:"-"` }
func (*UserRoleBind) TableComment ¶
func (u *UserRoleBind) TableComment() string
func (*UserRoleBind) TableName ¶
func (u *UserRoleBind) TableName() string
type UserStatus ¶
type UserStatus uint8
type UserVerify ¶
type UserVerify struct { CreatedBy string `db:"column:创建人;type:varchar(50);"` CreatedAt *time.Time `db:"column:创建时间;type:datetime;"` UpdatedBy string `db:"column:修改人;type:varchar(50);"` UpdatedAt *time.Time `db:"column:修改时间;type:datetime;"` DeletedBy string `db:"column:删除人;type:varchar(50);"` DeletedAt *time.Time `db:"column:删除时间;type:datetime;"` ID int64 `db:"column:ID;type:bigint(22);comment:主键,唯一ID;is not null;primarykey;"` UserID int64 `db:"column:用户ID;type:bigint(22);comment:外键,用户ID;is not null;"` Url string `db:"column:医师执照URL;type:varchar(255);"` }
func (*UserVerify) TableComment ¶
func (u *UserVerify) TableComment() string
func (*UserVerify) TableName ¶
func (u *UserVerify) TableName() string
type VerifyStatus ¶
type VerifyStatus int32
const ( VerifyValid VerifyStatus //1 审核 VerifyUnValid //2 未审核 )
func GetVerifyStatus ¶
func GetVerifyStatus(s bool) VerifyStatus
func (VerifyStatus) Bool ¶
func (r VerifyStatus) Bool() bool
func (VerifyStatus) String ¶
func (r VerifyStatus) String() string
Click to show internal directories.
Click to hide internal directories.