Files
soul-yongping/soul-api/internal/model/mentor_consultation.go
2026-03-07 22:58:43 +08:00

20 lines
1.1 KiB
Go

package model
import "time"
// MentorConsultation 导师预约单
type MentorConsultation struct {
ID int `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
UserID int `gorm:"column:user_id;not null;index" json:"userId"`
MentorID int `gorm:"column:mentor_id;not null;index" json:"mentorId"`
ConsultationType string `gorm:"column:consultation_type;size:20;not null" json:"consultationType"` // single, half_year, year
Amount float64 `gorm:"column:amount;type:decimal(10,2);not null" json:"amount"`
Status string `gorm:"column:status;size:20;default:created;index" json:"status"` // created, pending_pay, paid, completed, cancelled
OrderID *int `gorm:"column:order_id" json:"orderId,omitempty"` // 关联支付订单
ScheduledAt *time.Time `gorm:"column:scheduled_at" json:"scheduledAt,omitempty"`
CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"`
UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
}
func (MentorConsultation) TableName() string { return "mentor_consultations" }