32 lines
2.3 KiB
Go
32 lines
2.3 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// 文物表
|
|
type Artifact struct {
|
|
ID string `json:"id" gorm:"type:varchar(32);primaryKey"`
|
|
Code string `json:"code" gorm:"type:varchar(64);not null;uniqueIndex;comment:'文物编码'"`
|
|
Name string `json:"name" gorm:"type:varchar(128);not null;index"`
|
|
OrgID string `json:"orgId" gorm:"type:varchar(32);not null;index"`
|
|
Category string `json:"category" gorm:"type:varchar(50);default:'';comment:'文物类别'"`
|
|
Material string `json:"material" gorm:"type:varchar(50);default:'';comment:'材质'"`
|
|
Period string `json:"period" gorm:"type:varchar(50);default:'';comment:'年代'"`
|
|
Description string `json:"description" gorm:"type:text;comment:'文物描述'"`
|
|
CurrentUser string `json:"currentUser" gorm:"type:varchar(32);default:'';comment:'当前所属用户'"`
|
|
Remark string `json:"remark" gorm:"type:varchar(255);comment:'文物备注'"`
|
|
Province string `json:"province" gorm:"type:varchar(50);default:'';comment:'省'"`
|
|
City string `json:"city" gorm:"type:varchar(50);default:'';comment:'市'"`
|
|
District string `json:"district" gorm:"type:varchar(50);default:'';comment:'区/县'"`
|
|
Address string `json:"address" gorm:"type:varchar(255);default:'';comment:'详细地址'"`
|
|
StatisticsPeriod string `json:"statisticsPeriod" gorm:"type:varchar(50);default:'';comment:'统计年代'"`
|
|
LevelType string `json:"levelType" gorm:"type:varchar(50);default:'';comment:'层级类型'"`
|
|
BuildingType string `json:"buildingType" gorm:"type:varchar(50);default:'';comment:'建筑类型'"`
|
|
CurrentOrg string `json:"currentOrg" gorm:"type:varchar(32);default:'';comment:'当前所属机构'"`
|
|
Introduction string `json:"introduction" gorm:"type:text;comment:'简介'"`
|
|
Images string `json:"images" gorm:"type:varchar(255);default:'';comment:'图片'"`
|
|
Icon string `json:"icon" gorm:"type:varchar(255);default:'';comment:'图标'"`
|
|
Sort int `json:"sort" gorm:"type:int;default:0;comment:'排序'"`
|
|
CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
|
|
}
|