refactor: rename safe and audit backend resources
This commit is contained in:
15
backend/api/internal/models/safe_inspection.go
Normal file
15
backend/api/internal/models/safe_inspection.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "git.apinb.com/bsm-sdk/core/database"
|
||||
|
||||
// SafeInspection 对应 safe_inspection,保存安检与复检记录。
|
||||
type SafeInspection struct {
|
||||
Entity // 公共实体字段
|
||||
UserAccountID uint64 `gorm:"column:user_account_id;not null;index" json:"user_account_id"` // user_account_id 业务字段
|
||||
StaffAccountID uint64 `gorm:"column:staff_account_id;not null;index" json:"staff_account_id"` // staff_account_id 业务字段
|
||||
Result string `gorm:"column:result;type:varchar(32);not null" json:"result"` // result 业务字段
|
||||
EvidenceURI string `gorm:"column:evidence_uri;type:varchar(512);not null;default:''" json:"evidence_uri"` // evidence_uri 业务字段
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&SafeInspection{}) }
|
||||
func (table *SafeInspection) TableName() string { return "safe_inspection" }
|
||||
Reference in New Issue
Block a user