2022-02-06 18:01:32 +08:00
|
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
// TechnologyPatent 专利信息数据模型
|
|
|
|
|
type TechnologyPatent struct {
|
|
|
|
|
Model
|
|
|
|
|
ModelTenant
|
2022-02-08 08:56:28 +08:00
|
|
|
|
UID uint64 `gorm:"column:uid;type:int;default:0;comment:用户uuid" json:"-"`
|
|
|
|
|
Kind TechnologyPatentKind `gorm:"column:kind;index:idx_sys_patent_kind;type:tinyint(1);default:0;comment:专利类型" json:"kind"`
|
|
|
|
|
Title string `gorm:"column:title;type:varchar(100);default:'';comment:名称标题" json:"title"`
|
|
|
|
|
FileUrl string `gorm:"column:file_url;type:varchar(255);default:'';comment:文件地址" json:"file_url"`
|
|
|
|
|
ApplyCode string `gorm:"column:apply_code;type:varchar(30);default:'';comment:申请号" json:"apply_code"`
|
|
|
|
|
ApplyAt string `gorm:"column:apply_at;type:varchar(10);default:'';comment:申请日" json:"apply_at"`
|
|
|
|
|
OpenCode string `gorm:"column:open_code;type:varchar(30);default:'';comment:公开(公告)号" json:"open_code"`
|
|
|
|
|
OpenAt string `gorm:"column:open_at;type:varchar(10);default:'';comment:公开(公告)日" json:"open_at"`
|
|
|
|
|
ApplyName string `gorm:"column:apply_name;type:varchar(255);default:'';comment:申请(专利权)人" json:"apply_name"`
|
|
|
|
|
ApplyAddress string `gorm:"column:apply_address;type:varchar(255);default:'';comment:申请人地址" json:"apply_address"`
|
|
|
|
|
Inventor string `gorm:"column:inventor;type:varchar(255);default:'';comment:发明人" json:"inventor"`
|
|
|
|
|
Description string `gorm:"column:description;type:text;comment:摘要" json:"description"`
|
|
|
|
|
PrincipalClaim string `gorm:"column:principal_claim;type:text;comment:主权项" json:"principal_claim"`
|
|
|
|
|
IPCCode string `gorm:"column:ipc_code;index:idx_sys_patent_ipc_code;type:varchar(30);default:'';comment:IPC主分类号" json:"ipc_code"`
|
2022-02-06 18:01:32 +08:00
|
|
|
|
Shelf
|
2022-02-08 08:56:28 +08:00
|
|
|
|
Status TechnologyPatentStatus `gorm:"column:status;type:tinyint(1);default:1;comment:专利状态(1:授权,2:实审,3:公开)" json:"-"`
|
2022-02-06 18:01:32 +08:00
|
|
|
|
ModelDeleted
|
|
|
|
|
ModelAt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TechnologyPatentKind 专利类型
|
|
|
|
|
type TechnologyPatentKind int
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// TechnologyPatentKindForInvent 发明专利
|
|
|
|
|
TechnologyPatentKindForInvent TechnologyPatentKind = iota + 1
|
|
|
|
|
// TechnologyPatentKindForDesign 外观设计
|
|
|
|
|
TechnologyPatentKindForDesign
|
|
|
|
|
// TechnologyPatentKindForNewPractical 实用新型
|
|
|
|
|
TechnologyPatentKindForNewPractical
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// TechnologyPatentStatus 专利状态
|
|
|
|
|
type TechnologyPatentStatus int
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
// TechnologyPatentStatusForAuthorize 授权
|
|
|
|
|
TechnologyPatentStatusForAuthorize TechnologyPatentStatus = iota + 1
|
|
|
|
|
// TechnologyPatentStatusForActualTrial 实审
|
|
|
|
|
TechnologyPatentStatusForActualTrial
|
|
|
|
|
// TechnologyPatentStatusForPublic 公开
|
|
|
|
|
TechnologyPatentStatusForPublic
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (m *TechnologyPatent) TableName() string {
|
|
|
|
|
return "technology_patent"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *TechnologyPatent) KindTitle() string {
|
2022-02-08 08:56:28 +08:00
|
|
|
|
if m.Kind == TechnologyPatentKindForInvent {
|
2022-02-06 18:01:32 +08:00
|
|
|
|
return "发明专利"
|
2022-02-08 08:56:28 +08:00
|
|
|
|
} else if m.Kind == TechnologyPatentKindForDesign {
|
2022-02-06 18:01:32 +08:00
|
|
|
|
return "外观设计"
|
2022-02-08 08:56:28 +08:00
|
|
|
|
} else if m.Kind == TechnologyPatentKindForNewPractical {
|
2022-02-06 18:01:32 +08:00
|
|
|
|
return "实用新型"
|
|
|
|
|
}
|
|
|
|
|
return "未知"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewTechnologyPatent() *TechnologyPatent {
|
|
|
|
|
return &TechnologyPatent{}
|
|
|
|
|
}
|