Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("user not found")
)
Functions ¶
This section is empty.
Types ¶
type Conversation ¶
type LikeAndDislike ¶
type Message ¶
type Message struct { ID int `gorm:"type:int;primary_key;AUTO_INCREMENT" json:"id"` ConversationId int `gorm:"type:int(11);not null" json:"conversation_id"` SenderId int `gorm:"type:int(11);not null" json:"sender_id"` Type int `gorm:"type:int(11);default:1" json:"type"` // 1_text, 2_image Message string `gorm:"type:nvarchar(255);not null" json:"message"` SentOn time.Time `gorm:"type:timestamp;not null" json:"sent_on"` }
type Participant ¶
type User ¶
type User struct { // gorm.Model ID int `gorm:"primary_key;auto_increment" json:"id,omitempty"` Username string `form:"username" binding:"required" gorm:"column:username;type:varchar(50);unique;not null" json:"username,omitempty"` Password string `form:"password" binding:"required" gorm:"column:password;type:varchar(255);not null;" json:"password,omitempty"` Name string `form:"name" binding:"required" gorm:"column:name;type:nvarchar(50);not null" json:"name,omitempty"` DateOfBirth *time.Time `` /* 145-byte string literal not displayed */ PhoneNumber string `form:"phone" binding:"required" gorm:"column:phone_number;type:varchar(12);not null" json:"phone_number,omitempty"` Sex bool `form:"sex" gorm:"column:sex;type:bool;not null" json:"sex,omitempty"` Email string `form:"email" binding:"required" gorm:"column:email;type:varchar(60);not mull;unique" json:"email,omitempty"` SexOfInterest bool `form:"soi" gorm:"column:sex_of_interest;type:bool;not null" json:"sex_of_interest,omitempty"` Job string `form:"job" gorm:"column:job;type:nvarchar(30)" json:"job,omitempty"` Degree string `form:"degree" gorm:"column:degree;type:nvarchar(30)" json:"degree,omitempty"` MinAgeOfInterest int `` /* 126-byte string literal not displayed */ MaxAgeOfInterest int `` /* 126-byte string literal not displayed */ Latitude float64 `form:"latitude" gorm:"column:latitude;type:float(10,6)" json:"latitude,omitempty"` Longitude float64 `form:"longitude" gorm:"column:longitude;type:float(10,6)" json:"longitude,omitempty"` AvatarImg string `form:"ava_img" gorm:"column:avatar_img;type:varchar(255)" json:"avatar_img,omitempty"` SecretKey string `gorm:"column:secret_key;type:varchar(36);default:'more than code'" json:"secret_key,omitempty"` LastSeen *time.Time `gorm:"column:last_seen;type:datetime" json:"last_seen,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.