package model

import (
	"time"
)

type ExamService struct {
	ID              int64      `gorm:"primaryKey;autoIncrement;column:id" csv:"id"`
	ExamID          string     `gorm:"column:exam_id" csv:"exam_id"`
	AccountName     string     `gorm:"column:account_name" csv:"account_name"`
	AccountID       string     `gorm:"column:account_id" csv:"account_id"`
	OrderNumber     string     `gorm:"column:order_number"  csv:"order_number"`
	BusinessEntity  string     `gorm:"column:business_entity" csv:"business_entity"`
	CurrencyISOCode string     `gorm:"column:currency_iso_code" csv:"currency_iso_code"`
	Tax             float32    `gorm:"column:tax" csv:"tax"`
	Amount          float32    `gorm:"column:amount" csv:"amount"`
	UnitPrice       float32    `gorm:"column:unit_price" csv:"unit_price"`
	Quantity        int        `gorm:"column:quantity" csv:"quantity"`
	ExamName        string     `gorm:"column:exam_name" csv:"exam_name"`
	ProductFamily   string     `gorm:"column:product_family" csv:"product_family"`
	ExamStartTime   *time.Time `gorm:"column:exam_start_time" csv:"exam_start_time"`
	EndTime         *time.Time `gorm:"column:end_time" csv:"end_time"`
	ExamExpireTime  *time.Time `gorm:"column:exam_expire_time" csv:"exam_expire_time"`
	PaymentTime     *time.Time `gorm:"column:payment_time" csv:"payment_time"`
	CreatedAt       time.Time  `gorm:"column:created_at;default:CURRENT_TIMESTAMP" csv:"created_at"`
	UpdatedTime     time.Time  `gorm:"column:updated_time" csv:"updated_time"`
}

func (ExamService) TableName() string {
	return "exam_service"
}
