Spaces:
Sleeping
Sleeping
File size: 1,048 Bytes
f71a293 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package models
import (
"time"
uuid "github.com/satori/go.uuid"
)
type Account struct {
Id uint `gorm:"primaryKey" json:"id"`
UUID uuid.UUID `gorm:"type:uuid" json:"uuid" `
Email string `gorm:"uniqueIndex" json:"email"`
Password string `json:"password"`
IsEmailVerified bool `json:"is_email_verified"`
IsDetailCompleted bool `json:"is_detail_completed"`
CreatedAt time.Time `json:"created_at"`
DeletedAt *time.Time `json:"deleted_at" gorm:"default:null"`
}
type AccountDetails struct {
ID uint `gorm:"primaryKey" json:"id"`
AccountId uint `json:"account_id"`
InitialName string `json:"initial_name"`
FullName *string `json:"full_name"`
University *string `json:"university"`
PhoneNumber *string `json:"phone_number"`
}
// Gorm table name settings
func (Account) TableName() string { return "account" }
func (AccountDetails) TableName() string { return "account_details" }
|