feat: Initial commit

This commit is contained in:
engigu
2025-12-20 09:30:16 +08:00
commit 362237241e
189 changed files with 12035 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
package models
import (
"baihu/internal/constant"
"gorm.io/gorm"
)
// EnvironmentVariable represents an environment variable
type EnvironmentVariable struct {
ID uint `json:"id" gorm:"primaryKey"`
Name string `json:"name" gorm:"size:255;not null"`
Value string `json:"value" gorm:"type:text"`
Remark string `json:"remark" gorm:"size:500"`
UserID uint `json:"user_id" gorm:"index"`
CreatedAt LocalTime `json:"created_at"`
UpdatedAt LocalTime `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}
func (EnvironmentVariable) TableName() string {
return constant.TablePrefix + "envs"
}
// Script represents a script file
type Script struct {
ID uint `json:"id" gorm:"primaryKey"`
Name string `json:"name" gorm:"size:255;not null"`
Content string `json:"content" gorm:"type:text"`
UserID uint `json:"user_id" gorm:"index"`
CreatedAt LocalTime `json:"created_at"`
UpdatedAt LocalTime `json:"updated_at"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}
func (Script) TableName() string {
return constant.TablePrefix + "scripts"
}