add bb_api rest api for begushiybashkir
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Email string `gorm:"uniqueIndex;not null" json:"email"`
|
||||
Password string `gorm:"not null" json:"-"`
|
||||
FirstName string `json:"first_name"`
|
||||
LastName string `json:"last_name"`
|
||||
Role string `gorm:"default:user" json:"role"` // user, admin
|
||||
IsActive bool `gorm:"default:true" json:"is_active"`
|
||||
LastLogin time.Time `json:"last_login"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// Другие модели будут добавлены позже
|
||||
// type Profile {}, type Event {}, type Review {}, etc.
|
||||
Reference in New Issue
Block a user