Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PBUserType2DBUserType = map[mgmtPB.OwnerType]string{ mgmtPB.OwnerType_OWNER_TYPE_UNSPECIFIED: "unspecified", mgmtPB.OwnerType_OWNER_TYPE_USER: "user", mgmtPB.OwnerType_OWNER_TYPE_ORGANIZATION: "organization", } DBUserType2PBUserType = map[string]mgmtPB.OwnerType{ "unspecified": mgmtPB.OwnerType_OWNER_TYPE_UNSPECIFIED, "user": mgmtPB.OwnerType_OWNER_TYPE_USER, "organization": mgmtPB.OwnerType_OWNER_TYPE_ORGANIZATION, } )
maps for user owner type
Functions ¶
Types ¶
type Base ¶
type Base struct { UID uuid.UUID `gorm:"type:uuid;primary_key;<-:create"` // allow read and create, but not update CreateTime time.Time `gorm:"autoCreateTime:nano;<-:create"` // allow read and create, but not update UpdateTime time.Time `gorm:"autoUpdateTime:nano"` }
Base contains common columns for all tables
type User ¶
type User struct { Base ID string `gorm:"unique;not null;"` OwnerType sql.NullString Email string `gorm:"unique;not null;"` CustomerId string FirstName sql.NullString LastName sql.NullString OrgName sql.NullString Role sql.NullString NewsletterSubscription bool `gorm:"default:false"` CookieToken sql.NullString }
User defines a user instance in the database
Click to show internal directories.
Click to hide internal directories.