package entity import ( "narasi-ahli-be/app/database/entity/users" "time" ) type AIChatLogs struct { ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"` SessionID uint `json:"session_id" gorm:"type:int4;not null;index"` UserID uint `json:"user_id" gorm:"type:int4;not null;index"` StartDate time.Time `json:"start_date" gorm:"not null"` EndDate *time.Time `json:"end_date"` TotalDuration int64 `json:"total_duration" gorm:"type:bigint;default:0"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` Session *AIChatSessions `json:"session" gorm:"foreignKey:SessionID;references:ID"` User *users.Users `json:"user" gorm:"foreignKey:UserID;references:ID"` }