package model import "shylinux.com/x/mysql-story/src/db" const ( UID = "uid" NAME = "name" TYPE = "type" ROLE = "role" TITLE = "title" CONTENT = "content" USER_UID = "user_uid" USER_REPOS_ROLE = "user_repos_role" REPOS_UID = "repos_uid" REPOS_NAME = "repos_name" REPOS_TYPE = "repos_type" VERSION_UID = "version_uid" COMPANY_UID = "company_uid" CITY_UID = "city_uid" ) type UserRepos struct { db.ModelUserPlace ReposUID string `gorm:"type:char(32);index"` } type Repos struct { db.ModelPlace CompanyUID string `gorm:"type:char(32);index"` } type Version struct { db.ModelContent ReposUID string `gorm:"type:char(32);index"` } func init() { db.CmdModels("", &UserRepos{}, &Repos{}, &Version{}) }