crm/models/trial_period.go
2026-01-16 18:59:19 +08:00

30 lines
1.0 KiB
Go

package models
import "time"
// TrialPeriod represents a trial period for a customer (客户信息)
type TrialPeriod struct {
ID string `json:"id"`
CustomerName string `json:"customerName"` // 直接存储客户名称
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
IsTrial bool `json:"isTrial"`
CreatedAt time.Time `json:"createdAt"`
}
// CreateTrialPeriodRequest represents the request to create a trial period
type CreateTrialPeriodRequest struct {
CustomerName string `json:"customerName"` // 直接使用客户名称
StartTime string `json:"startTime"`
EndTime string `json:"endTime"`
IsTrial bool `json:"isTrial"`
}
// UpdateTrialPeriodRequest represents the request to update a trial period
type UpdateTrialPeriodRequest struct {
CustomerName *string `json:"customerName,omitempty"`
StartTime *string `json:"startTime,omitempty"`
EndTime *string `json:"endTime,omitempty"`
IsTrial *bool `json:"isTrial,omitempty"`
}