@@ -41,30 +41,20 @@ func (s Status) Extendable() bool {
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
ID string `gorm:"type:uuid;primaryKey" json:"id"`
|
||||
ClientName string `gorm:"size:64;not null;index" json:"client_name"`
|
||||
Status Status `gorm:"size:20;not null;index" json:"status"`
|
||||
Namespace string `gorm:"size:63;uniqueIndex" json:"namespace"`
|
||||
Host string `gorm:"size:255" json:"host"`
|
||||
URL string `gorm:"size:255" json:"url"`
|
||||
// CustomDomain : domaine du client, servi en plus de Host ("" = aucun).
|
||||
// URL pointe dessus quand il est défini.
|
||||
CustomDomain string `gorm:"size:255" json:"custom_domain,omitempty"`
|
||||
// OwnerUsername : compte client qui a demandé le site ("" = déployé
|
||||
// directement par l'admin). Donne au client la lecture de son site.
|
||||
OwnerUsername string `gorm:"size:64;index" json:"owner_username,omitempty"`
|
||||
|
||||
// AdminUsername : compte admin créé dans le backend déployé (le mot de
|
||||
// passe n'est jamais persisté). AdminNumber : ADMIN_NUMBER du backend.
|
||||
AdminUsername string `gorm:"size:64" json:"admin_username"`
|
||||
AdminNumber int `json:"admin_number"`
|
||||
|
||||
// MonthsPurchased : total des mois souscrits (création + renouvellements).
|
||||
MonthsPurchased int `json:"months_purchased"`
|
||||
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
// ExpiresAt : fin de l'abonnement (le projet est alors supprimé).
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
ID string `gorm:"type:uuid;primaryKey" json:"id"`
|
||||
ClientName string `gorm:"size:64;not null;index" json:"client_name"`
|
||||
Status Status `gorm:"size:20;not null;index" json:"status"`
|
||||
Namespace string `gorm:"size:63;uniqueIndex" json:"namespace"`
|
||||
Host string `gorm:"size:255" json:"host"`
|
||||
URL string `gorm:"size:255" json:"url"`
|
||||
CustomDomain string `gorm:"size:255" json:"custom_domain,omitempty"`
|
||||
OwnerUsername string `gorm:"size:64;index" json:"owner_username,omitempty"`
|
||||
AdminUsername string `gorm:"size:64" json:"admin_username"`
|
||||
AdminNumber int `json:"admin_number"`
|
||||
MonthsPurchased int `json:"months_purchased"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
UpdateAt time.Time `json:"update_at"`
|
||||
}
|
||||
|
||||
func (Project) TableName() string { return "projects" }
|
||||
|
||||
Reference in New Issue
Block a user