Documentation ¶
Index ¶
Constants ¶
View Source
const ( BasicStatusApplying = 1 // 申请中,尚未走完初申流程 BasicStatusWaiting = 2 // 已建立,待分配 BasicStatusRunning = 4 // 已分配部分或全部资源 BasicStatusSettlement = 8 // 已归还全部资源,项目结算单审阅中 BasicStatusDeserted = 64 // 已放弃的项目(只有从未分配过资源的项目可被放弃,即处于Applying和Waiting状态) BasicStatusArchived = 128 // 已全部结束归档的项目,即将转入历史数据库 )
Variables ¶
View Source
var SchemaInfo = `` /* 738-byte string literal not displayed */
View Source
var TableHistoryName = "history_project_info"
View Source
var TableName = "project_info"
Functions ¶
func GetSchemaHistory ¶
func GetSchemaHistory() string
Types ¶
type AllocNum ¶
type AllocNum struct { ProjectID int `db:"project_id" json:"project_id"` CpuNodesAcquired int `db:"cpu_nodes_acquired" json:"cpu_nodes_acquired"` GpuNodesAcquired int `db:"gpu_nodes_acquired" json:"gpu_nodes_acquired"` StorageSizeAcquired int `db:"storage_size_acquired" json:"storage_size_acquired"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type ApplyInfo ¶
type ApplyInfo struct { ProjectID int `db:"project_id" json:"project_id"` StartDate time.Time `db:"start_date" json:"start_date"` TotalDaysApply int `db:"total_days_apply" json:"total_days_apply"` EndReminderAt time.Time `db:"end_reminder_at" json:"end_reminder_at"` CpuNodesExpected int `db:"cpu_nodes_expected" json:"cpu_nodes_expected"` GpuNodesExpected int `db:"gpu_nodes_expected" json:"gpu_nodes_expected"` StorageSizeExpected int `db:"storage_size_expected" json:"storage_size_expected"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
type Info ¶
type Info struct { // Static 8 ProjectID int `db:"project_id" json:"project_id"` ProjectName string `db:"project_name" json:"project_name"` ProjectCode string `db:"project_code" json:"project_code"` DepartmentCode string `db:"department_code" json:"department_code"` Department string `db:"department" json:"department"` ChiefID int `db:"chief_id" json:"chief_id"` ChiefChineseName string `db:"chief_cn_name" json:"chief_cn_name"` ExtraInfo string `db:"extra_info" json:"extra_info"` // Status 4 BasicStatus int `db:"basic_status" json:"basic_status"` // Apply Info 6 StartDate time.Time `db:"start_date" json:"start_date"` TotalDaysApply int `db:"total_days_apply" json:"total_days_apply"` EndReminderAt time.Time `db:"end_reminder_at" json:"end_reminder_at"` CpuNodesExpected int `db:"cpu_nodes_expected" json:"cpu_nodes_expected"` GpuNodesExpected int `db:"gpu_nodes_expected" json:"gpu_nodes_expected"` StorageSizeExpected int `db:"storage_size_expected" json:"storage_size_expected"` // Alloc 3+2 CpuNodesAcquired int `db:"cpu_nodes_acquired" json:"cpu_nodes_acquired"` GpuNodesAcquired int `db:"gpu_nodes_acquired" json:"gpu_nodes_acquired"` StorageSizeAcquired int `db:"storage_size_acquired" json:"storage_size_acquired"` AccountAllocInfo string `db:"account_alloc_info" json:"account_alloc_info"` StorageAllocInfo string `db:"storage_alloc_info" json:"storage_alloc_info"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.