package models

import "time"

type UserCallHistory struct {
	ID                uint       `gorm:"column:id;primaryKey" json:"id"`
	UserID            uint       `gorm:"column:userId" json:"userId"`
	AstrologerID      uint       `gorm:"column:astrologerId" json:"astrologerId"`
	CallStatus        string     `gorm:"column:callStatus" json:"callStatus"`
	DeductionAmount   float64    `gorm:"column:deductionAmount" json:"deductionAmount"`
	CallDuration      int        `gorm:"column:callDuration" json:"callDuration"`
	CallType          string     `gorm:"column:callType" json:"callType"`
	CallHistoryNumber string     `gorm:"column:callHistoryNumber" json:"callHistoryNumber"`

	Name        string     `gorm:"column:name" json:"name"`
	BirthDate   *time.Time `gorm:"column:birthDate" json:"birthDate,omitempty"`
	BirthTime   string     `gorm:"column:birthTime" json:"birthTime"`
	BirthPlace  string     `gorm:"column:birthPlace" json:"birthPlace"`
	Gender      string     `gorm:"column:gender" json:"gender"`

	IsActive bool `gorm:"column:isActive"`
	IsDelete bool `gorm:"column:isDelete"`

	CreatedAt *time.Time `gorm:"column:created_at"`
	UpdatedAt *time.Time `gorm:"column:updated_at"`

	CreatedBy  int `gorm:"column:createdBy"`
	ModifiedBy int `gorm:"column:modifiedBy"`
}

func (UserCallHistory) TableName() string {
	return "user_call_histories"
}