package models

import "time"

type Kundali struct {
	ID               uint      `gorm:"primaryKey;autoIncrement" json:"id"`
	Name             string    `gorm:"column:name;type:varchar(255);not null" json:"name"`
	Gender           string    `gorm:"column:gender;type:varchar(255);not null" json:"gender"`
	BirthDate        time.Time `gorm:"column:birthDate;type:datetime;not null" json:"birthDate"`
	BirthTime        string    `gorm:"column:birthTime;type:varchar(255);not null" json:"birthTime"`
	BirthPlace       string    `gorm:"column:birthPlace;type:varchar(255);not null" json:"birthPlace"`
	IsActive         bool      `gorm:"column:isActive;default:true" json:"isActive"`
	IsDelete         bool      `gorm:"column:isDelete;default:false" json:"isDelete"`
	Latitude         *float64  `gorm:"column:latitude;type:double" json:"latitude"`
	Longitude        *float64  `gorm:"column:longitude;type:double" json:"longitude"`
	Timezone         *string   `gorm:"column:timezone;type:varchar(45)" json:"timezone"`
	IsForTrackPlanet *bool     `gorm:"column:isForTrackPlanet" json:"isForTrackPlanet"`
	PDFType          string    `gorm:"column:pdf_type;type:varchar(255);not null" json:"pdf_type"`
	MatchType        string    `gorm:"column:match_type;type:varchar(255);not null" json:"match_type"`
	ForMatch         string    `gorm:"column:forMatch;type:varchar(10);default:'0'" json:"forMatch"`

	PDFLink *string `gorm:"column:pdf_link;type:text" json:"pdf_link,omitempty"`

	VedicPDFLink *string `gorm:"column:vedic_pdf_link;type:text" json:"vedic_pdf_link"`

	DetailsJSON *string `gorm:"column:details_json;type:longtext" json:"-"`

	CreatedBy  int        `gorm:"column:createdBy;not null" json:"createdBy"`
	ModifiedBy int        `gorm:"column:modifiedBy;not null" json:"modifiedBy"`
	CreatedAt  *time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt  *time.Time `gorm:"column:updated_at" json:"updated_at"`
}

func (Kundali) TableName() string {
	return "kundalis"
}
