package models import "time" // RiderSubstitution represents the rider_substitutions table type RiderSubstitution struct { ID int `json:"id" gorm:"primaryKey;autoIncrement"` TenantID int `json:"tenant_id" gorm:"not null;uniqueIndex:uq_date_absent"` SubDate string `json:"sub_date" gorm:"type:date;not null;uniqueIndex:uq_date_absent;index:idx_date;index:idx_tenant_date"` AbsentRiderID int `json:"absent_rider_id" gorm:"not null;uniqueIndex:uq_date_absent"` AbsentRiderName string `json:"absent_rider_name" gorm:"size:100;not null"` SubRiderID int `json:"sub_rider_id" gorm:"not null"` SubRiderName string `json:"sub_rider_name" gorm:"size:100;not null"` Reason string `json:"reason" gorm:"size:255"` Status string `json:"status" gorm:"type:enum('scheduled','active','completed','cancelled');default:'scheduled';not null;index:idx_status"` CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"` }