提交 7290de07 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

向gormv2过度 自定义类型长度使用size进行限制

上级 c9ce93d5
......@@ -8,7 +8,7 @@ type SysAuthority struct {
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:'角色ID';type:varchar(100)"`
AuthorityId string `json:"authorityId" gorm:"not null;unique;primary_key;comment:'角色ID';size:90"`
AuthorityName string `json:"authorityName" gorm:"comment:'角色名'"`
ParentId string `json:"parentId" gorm:"comment:'父角色ID'"`
DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id;association_jointable_foreignkey:data_authority_id"`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册