entities

package
v0.0.0-...-cd133ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	AnswerId   uint64 `gorm:"primaryKey; autoIncrement"`
	UserId     uint64 `gorm:"notNull;"`
	QuestionId uint64 `gorm:"notNull;"`
	OptionId   uint64 `gorm:"notNull;"`
}

type Category

type Category struct {
	CategoryId uint64 `gorm:"primaryKey; autoIncrement"`
	Category   string `gorm:"notNull;"`
}

type Common

type Common struct {
	CreatedAt time.Time `gorm:"autoUpdateTime:milli"`
	UpdatedAt time.Time `gorm:"autoCreateTime"`
}

type GetCommonQuestionsResponse

type GetCommonQuestionsResponse struct {
	QuestionId uint64
	Title      string
	OptionId   uint64
	Option     string
	Quantity   uint64
}

type Option

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

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

type User struct {
	//USERID AUTO GENERATE
	UserId     uint64    `gorm:"primaryKey; autoIncrement"`
	Account    string    `gorm:"type:varchar(50); unique; notNull;"`
	Pwd        string    `gorm:"notNull"`
	Last_login time.Time `gorm:"autoCreateTime"`
	Common
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL