entity

package
v0.0.0-...-f2087f5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 0 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 {
	ID         uint64 `gorm:"primary_key:auto_increment" json:"id"`
	Answer     string `gorm:"type:varchar(255)" json:"answer"`
	UserID     uint64 `gorm:"type:int(11);not null" json:"user_id"`
	QuestionID uint64 `gorm:"type:int(11);not null" json:"question_id"`
}

type Question

type Question struct {
	ID       uint64 `gorm:"primary_key:auto_increment" json:"id"`
	Question string `gorm:"type:varchar(255)" json:"question"`
	UserID   uint64 `gorm:"not null" json:"-"`
}

type User

type User struct {
	ID       uint64 `gorm:"type:int(11);primary_key:auto_increment" json:"id"`
	Name     string `gorm:"type:varchar(255)" json:"name"`
	Email    string `gorm:"uniqueIndex;type:varchar(255)" json:"email"`
	Password string `gorm:"->;<-;not null" json:"-"`
	Token    string `gorm:"-" json:"token,omitempty"`
}

Jump to

Keyboard shortcuts

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