12345678910111213141516171819202122232425 |
- package model
- import (
- "time"
- )
- // File represents a file in the cloud storage
- type File struct {
- ID uint `gorm:"primarykey" json:"id"`
- Name string `gorm:"size:255;not null" json:"name"`
- Path string `gorm:"size:1024;not null" json:"path"`
- Size int64 `gorm:"not null" json:"size"`
- Type string `gorm:"size:50" json:"type"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- }
- // User represents a user in the system
- type User struct {
- ID uint `gorm:"primarykey" json:"id"`
- Username string `gorm:"size:50;uniqueIndex;not null" json:"username"`
- Password string `gorm:"size:255;not null" json:"-"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- }
|