package models

import "time"

type UserChatHistory struct {
	ID                uint       `gorm:"column:id;primaryKey" json:"id"`
	UserID            uint       `gorm:"column:userId" json:"userId"`
	AstrologerID      uint       `gorm:"column:astrologerId" json:"astrologerId"`
	ChatStatus        string     `gorm:"column:chatStatus" json:"chatStatus"`
	DeductionAmount   float64    `gorm:"column:deductionAmount" json:"deductionAmount"`
	ChatDuration      int        `gorm:"column:chatDuration" json:"chatDuration"`
	ChatType          string     `gorm:"column:chatType" json:"chatType"`
	ChatHistoryNumber string     `gorm:"column:chatHistoryNumber" json:"chatHistoryNumber"`
	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" json:"isActive"`
	IsDelete          bool       `gorm:"column:isDelete" json:"isDelete"`
	CreatedAt         *time.Time `gorm:"column:created_at" json:"createdAt,omitempty"`
	UpdatedAt         *time.Time `gorm:"column:updated_at" json:"updatedAt,omitempty"`
	CreatedBy         int        `gorm:"column:createdBy" json:"createdBy"`
	ModifiedBy        int        `gorm:"column:modifiedBy" json:"modifiedBy"`
}

func (UserChatHistory) TableName() string {
	return "user_chat_histories"
}