package
Version:
v0.0.0-...-cd133ac
Opens a new window with list of versions in this module.
Published: May 18, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Answer struct {
AnswerId uint64 `gorm:"primaryKey; autoIncrement"`
UserId uint64 `gorm:"notNull;"`
QuestionId uint64 `gorm:"notNull;"`
OptionId uint64 `gorm:"notNull;"`
}
type Category struct {
CategoryId uint64 `gorm:"primaryKey; autoIncrement"`
Category string `gorm:"notNull;"`
}
type Common struct {
CreatedAt time.Time `gorm:"autoUpdateTime:milli"`
UpdatedAt time.Time `gorm:"autoCreateTime"`
}
type Option struct {
OptionId uint64 `gorm:"primaryKey; autoIncrement"`
QuestionId uint64 `gorm:"notNull;"`
Option string `gorm:"notNull"`
Quantity uint64 `gorm:"notNull"`
State string `gorm:"notNull"`
Common
}
type Question struct {
QuestionId uint64 `gorm:"primaryKey; autoIncrement"`
Title string `gorm:"type:varchar(50); notNull;"`
CategoryId *uint64 `gorm:"notNull"`
UserId uint64 `gorm:"notNull"`
State string `gorm:"notNull"`
Common
}
type User struct {
UserId uint64 `gorm:"primaryKey; autoIncrement"`
Account string `gorm:"type:varchar(50); unique; notNull;"`
Pwd string `gorm:"notNull"`
Last_login time.Time `gorm:"autoCreateTime"`
Common
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.