19 lines
679 B
Go
19 lines
679 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Project struct {
|
|
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
|
|
UUID string `gorm:"size:36;uniqueIndex;not null" json:"uuid"`
|
|
OwnerUsername string `gorm:"size:100;not null;index" json:"owner_username"`
|
|
Name string `gorm:"size:200;not null" json:"name"`
|
|
IsActive bool `gorm:"default:true;index" json:"is_active"`
|
|
IsSystem bool `gorm:"default:false;index" json:"is_system"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
|
}
|
|
|
|
func (Project) TableName() string {
|
|
return "qt_projects"
|
|
}
|