2021-11-29 14:55:53 +08:00
|
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// TechnologyProject 技术科研项目数据模型
|
|
|
|
|
type TechnologyProject struct {
|
|
|
|
|
Model
|
|
|
|
|
Local
|
|
|
|
|
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
2021-12-03 14:18:06 +08:00
|
|
|
|
Kind string `gorm:"column:kind;type:varchar(100);default:'';comment:类型" json:"kind"`
|
2021-11-29 14:55:53 +08:00
|
|
|
|
Role TechnologyProjectRole `gorm:"column:role;type:tinyint(1);default:1;comment:课题角色(1:承担单位,2:参与单位)" json:"role"`
|
2021-12-03 14:18:06 +08:00
|
|
|
|
Title string `gorm:"column:title;type:varchar(100);default:'';comment:名称" json:"title"`
|
2021-11-29 14:55:53 +08:00
|
|
|
|
Amount float64 `gorm:"column:amount;decimal(10,2);default:0;comment:经费" json:"amount"`
|
2021-12-03 14:18:06 +08:00
|
|
|
|
Source string `gorm:"column:source;type:varchar(100);default:'';comment:来源" json:"source"`
|
|
|
|
|
Director string `gorm:"column:director;type:varchar(100);default:'';comment:负责人" json:"director"`
|
2021-11-29 14:55:53 +08:00
|
|
|
|
BeginAt time.Time `gorm:"column:begin_at;type:datetime;not null;comment:开始时间" json:"begin_at"`
|
|
|
|
|
FinishAt time.Time `gorm:"column:finish_at;type:datetime;not null;comment:结束时间" json:"finish_at"`
|
2021-12-03 10:08:23 +08:00
|
|
|
|
Shelf
|
2021-11-29 14:55:53 +08:00
|
|
|
|
ModelDeleted
|
|
|
|
|
ModelAt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type TechnologyProjectRole int
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// TechnologyProjectRoleForBear 承担
|
|
|
|
|
TechnologyProjectRoleForBear TechnologyProjectRole = iota + 1
|
|
|
|
|
// TechnologyProjectRoleForJoin 参与
|
|
|
|
|
TechnologyProjectRoleForJoin
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (m *TechnologyProject) TableName() string {
|
|
|
|
|
return "technology_project"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewTechnologyProject() *TechnologyProject {
|
|
|
|
|
return &TechnologyProject{}
|
|
|
|
|
}
|