Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { gorm.Model UserId int `gorm:"not null"` User User `gorm:"foreignKey:UserId;AssociationForeignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` RoomId int `gorm:"not null"` Room Room `gorm:"foreignKey:RoomId;AssociationForeignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` StartTime int64 `gorm:"not null"` EndTime int64 `gorm:"not null"` Theme string `gorm:"not null"` }
type Room ¶
type Room struct { gorm.Model CompanyId int `gorm:"not null"` Company Company `gorm:"foreignKey:CompanyId;AssociationForeignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Name string `gorm:"not null"` Capacity int `gorm:"not null"` Location string `gorm:"not null"` Facility string `gorm:"not null"` }
type User ¶
type User struct { gorm.Model Username string `gorm:"not null"` Password string `gorm:"not null"` Mobile string `gorm:"not null"` CompanyId int `gorm:"not null"` Company Company `gorm:"foreignKey:CompanyId;AssociationForeignKey:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` Avatar string `gorm:"not null;default:http://s42es6gy4.hn-bkt.clouddn.com/avatar.jpg"` Face string `gorm:"null"` Role int `gorm:"not null;default:1;check: role in(1,2)"` // 1:普通用户 2:管理员 }
Click to show internal directories.
Click to hide internal directories.