first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:48:15 +03:00
commit e6f3268c28
50 changed files with 4930 additions and 0 deletions

19
accounts/models.go Normal file
View File

@@ -0,0 +1,19 @@
package accounts
import (
"time"
"gorm.io/gorm"
)
type User struct {
ID uint `gorm:"primaryKey" json:"id"`
Email string `gorm:"uniqueIndex;not null" json:"email"`
PasswordHash string `gorm:"not null" json:"-"`
IsAdmin bool `gorm:"default:false" json:"is_admin"`
ApiToken string `gorm:"uniqueIndex" json:"api_token"`
ApiTokenExpiresAt *time.Time `json:"api_token_expires_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}