add bb_api rest api for begushiybashkir

This commit is contained in:
2025-10-07 05:23:40 +05:00
parent de0c992db9
commit 23d68e53ab
16 changed files with 552 additions and 1 deletions
+23
View File
@@ -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.