users.go 900 Bytes
Newer Older
kzkzzzz's avatar
kzkzzzz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package model

import (
	"time"
)

type User struct {
	Id              int       `json:"id"`                // Id
	Username        string    `json:"username"`          // Username
	IsEmailVerified int       `json:"is_email_verified"` // IsEmailVerified
	Email           string    `json:"email"`             // Email
	Password        string    `json:"password"`          // Password
	PasswordHash    string    `json:"password_hash"`     // PasswordHash
	Avatar          string    `json:"avatar"`            // Avatar
	Role            string    `json:"role"`              // Role
	Status          int       `json:"status"`            // Status
	LastSpace       int       `json:"last_space"`        // LastSpace
	CreatedAt       time.Time `json:"created_at"`        // CreatedAt
	UpdatedAt       time.Time `json:"updated_at"`        // UpdatedAt
}

func (u *User) TableName() string {
	return "users"
}