feat: 完善环境规则、会诊治理、知识审核与效果评估
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ConsultationOpinionVersion 专家意见版本,保留作者、时间、旧版本和修改原因。
|
||||
type ConsultationOpinionVersion struct {
|
||||
ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
|
||||
ConsultationID string `gorm:"column:consultation_id;type:uuid;index" json:"consultationId"`
|
||||
Version int `json:"version"`
|
||||
AuthorID *string `gorm:"column:author_id;type:uuid" json:"authorId,omitempty"`
|
||||
Opinion string `gorm:"type:text" json:"opinion"`
|
||||
Plan string `gorm:"type:text" json:"plan"`
|
||||
Reason *string `gorm:"type:text" json:"reason,omitempty"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
}
|
||||
|
||||
func (ConsultationOpinionVersion) TableName() string { return "consultation_opinion_versions" }
|
||||
|
||||
// RuleEngineResult 规则执行结果持久化。
|
||||
type RuleEngineResult struct {
|
||||
ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
|
||||
RuleVersion string `gorm:"column:rule_version;size:64" json:"ruleVersion"`
|
||||
Disease string `gorm:"size:64" json:"disease"`
|
||||
Level *string `gorm:"size:16" json:"level,omitempty"`
|
||||
Reason *string `gorm:"type:text" json:"reason,omitempty"`
|
||||
InputSnapshot json.RawMessage `gorm:"column:input_snapshot;type:jsonb" json:"inputSnapshot"`
|
||||
Missing json.RawMessage `gorm:"type:jsonb" json:"missing"`
|
||||
ComputedAt time.Time `gorm:"column:computed_at;type:timestamptz" json:"computedAt"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
}
|
||||
|
||||
func (RuleEngineResult) TableName() string { return "rule_engine_results" }
|
||||
|
||||
// KnowledgeReview 知识内容审核记录。
|
||||
type KnowledgeReview struct {
|
||||
ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
|
||||
EntityType string `gorm:"column:entity_type;size:32;index" json:"entityType"`
|
||||
EntityID string `gorm:"column:entity_id;size:128;index" json:"entityId"`
|
||||
Status string `gorm:"size:16" json:"status"`
|
||||
ReviewerID *string `gorm:"column:reviewer_id;type:uuid" json:"reviewerId,omitempty"`
|
||||
ReviewedAt *time.Time `gorm:"column:reviewed_at;type:timestamptz" json:"reviewedAt,omitempty"`
|
||||
Note *string `gorm:"type:text" json:"note,omitempty"`
|
||||
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
|
||||
}
|
||||
|
||||
func (KnowledgeReview) TableName() string { return "knowledge_reviews" }
|
||||
Reference in New Issue
Block a user