package models

type SignWeighRecord struct {
	ID                    int64   `gorm:"column:id" json:"id"`
	OrgID                 int64   `gorm:"column:org_id" json:"-"`
	PatientID             int64   `gorm:"column:patient_id" json:"patient_id"`
	ClothesWeight         float64 `gorm:"column:clothes_weight" json:"clothes_weight"`
	WeighBefore           float64 `gorm:"column:weigh_before" json:"weigh_before"`
	TemperatureBefore     float64 `gorm:"column:temperature_before" json:"temperature_before"`
	PulseRateBefore       float64 `gorm:"column:pulse_rate_before" json:"pulse_rate_before"`
	RespiratoryRateBefore float64 `gorm:"column:respiratory_rate_before" json:"respiratory_rate_before"`
	DBPBefore             float64 `gorm:"column:dbp_before" json:"dbp_before"`
	SBPBefore             float64 `gorm:"column:sbp_before" json:"sbp_before"`
	WeighAfter            float64 `gorm:"column:weigh_after" json:"weigh_after"`
	TemperatureAfter      float64 `gorm:"column:temperature_after" json:"temperature_after"`
	PulseRateAfter        float64 `gorm:"column:pulse_rate_after" json:"pulse_rate_after"`
	RespiratoryRateAfter  float64 `gorm:"column:respiratory_rate_after" json:"respiratory_rate_after"`
	DBPAfter              float64 `gorm:"column:dbp_after" json:"dbp_after"`
	SBPAfter              float64 `gorm:"column:sbp_after" json:"sbp_after"`
	Status                int8    `gorm:"column:status" json:"-"`
	CreateTime            int64   `gorm:"column:ctime" json:"-"`
	ModifyTime            int64   `gorm:"column:mtime" json:"-"`
}

func (SignWeighRecord) TableName() string {
	return "xt_sign_weigh"
}

type SigninAndWeigh struct {
	ID                           int64   `gorm:"column:id" json:"id" form:"id"`
	UserOrgId                    int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
	PatientId                    int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
	RecordDate                   int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
	SignTime                     int64   `gorm:"column:sign_time" json:"sign_time" form:"sign_time"`
	WeighTime                    int64   `gorm:"column:weigh_time" json:"weigh_time" form:"weigh_time"`
	WeighBeforeTime              int64   `gorm:"column:weigh_before_time" json:"weigh_before_time" form:"weigh_before_time"`
	DryWeight                    float64 `gorm:"column:dry_weight" json:"dry_weight" form:"dry_weight"`
	ClothingWeight               float64 `gorm:"column:clothing_weight" json:"clothing_weight" form:"clothing_weight"`
	WeightBefore                 float64 `gorm:"column:weight_before" json:"weight_before" form:"weight_before"`
	WeighingBefore               float64 `gorm:"column:weighing_before" json:"weighing_before" form:"weighing_before"`
	TargetDewatering             float64 `gorm:"column:target_dewatering" json:"target_dewatering" form:"target_dewatering"`
	TemperatureBefore            float64 `gorm:"column:temperature_before" json:"temperature_before" form:"temperature_before"`
	PulseFrequencyBefore         float64 `gorm:"column:pulse_frequency_before" json:"pulse_frequency_before" form:"pulse_frequency_before"`
	BreathingRateBefore          float64 `gorm:"column:breathing_rate_before" json:"breathing_rate_before" form:"breathing_rate_before"`
	SystolicBloodPressureBefore  float64 `gorm:"column:systolic_blood_pressure_before" json:"systolic_blood_pressure_before" form:"systolic_blood_pressure_before"`
	DiastolicBloodPressureBefore float64 `gorm:"column:diastolic_blood_pressure_before" json:"diastolic_blood_pressure_before" form:"diastolic_blood_pressure_before"`
	WeightAfter                  float64 `gorm:"column:weight_after" json:"weight_after" form:"weight_after"`
	WeighingAfter                float64 `gorm:"column:weighing_after" json:"weighing_after" form:"weighing_after"`
	WeightLoss                   float64 `gorm:"column:weight_loss" json:"weight_loss" form:"weight_loss"`
	TemperatureAfter             float64 `gorm:"column:temperature_after" json:"temperature_after" form:"temperature_after"`
	PulseFrequencyAfter          float64 `gorm:"column:pulse_frequency_after" json:"pulse_frequency_after" form:"pulse_frequency_after"`
	BreathingRateAfter           float64 `gorm:"column:breathing_rate_after" json:"breathing_rate_after" form:"breathing_rate_after"`
	SystolicBloodPressureAfter   float64 `gorm:"column:systolic_blood_pressure_after" json:"systolic_blood_pressure_after" form:"systolic_blood_pressure_after"`
	DiastolicBloodPressureAfter  float64 `gorm:"column:diastolic_blood_pressure_after" json:"diastolic_blood_pressure_after" form:"diastolic_blood_pressure_after"`
	Status                       int64   `gorm:"column:status" json:"status" form:"status"`
	CreatedTime                  int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
	UpdatedTime                  int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
}

func (SigninAndWeigh) TableName() string {
	return "xt_signin_and_weigh"
}

type SignPatients struct {
	Patients
	Schedule              Schedule              `json:"schedule" gorm:"foreignkey:PatientId"`
	SignWeight            SignWeight            `json:"signin" gorm:"foreignkey:PatientId"`
	DialysisOrder         DialysisOrder         `json:"dialysis_order" gorm:"foreignkey:PatientId"`
	PredialysisEvaluation PredialysisEvaluation `json:"predialysisevaluation" gorm:"foreignkey:PatientId"`
}

func (SignPatients) TableName() string {
	return "xt_patients"
}

type SignWeight struct {
	ID                           int64   `gorm:"column:id" json:"id" form:"id"`
	UserOrgId                    int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
	PatientId                    int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
	SignTime                     int64   `gorm:"column:sign_time" json:"sign_time" form:"sign_time"`
	RecordDate                   int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
	WeightBefore                 float64 `gorm:"column:weightbefore" json:"weightbefore" form:"weightbefore"`
	DryWeightBefore              float64 `gorm:"column:dry_weight_before" json:"dry_weight_before" form:"dry_weight_before"`
	TemperatureBefore            float64 `gorm:"column:temperature_before" json:"temperature_before" form:"temperature_before"`
	PulseFrequencyBefore         float64 `gorm:"column:pulse_frequency_before" json:"pulse_frequency_before" form:"pulse_frequency_before"`
	BreathingRateBefore          float64 `gorm:"column:breathing_rate_before" json:"breathing_rate_before" form:"breathing_rate_before"`
	SystolicBloodPressureBefore  float64 `gorm:"column:systolic_blood_pressure_before" json:"systolic_blood_pressure_before" form:"systolic_blood_pressure_before"`
	DiastolicBloodPressureBefore float64 `gorm:"column:diastolic_blood_pressure_before" json:"diastolic_blood_pressure_before" form:"diastolic_blood_pressure_before"`
	WeightAfter                  float64 `gorm:"column:weightafter" json:"weightafter" form:"weightafter"`
	TemperatureAfter             float64 `gorm:"column:temperature_after" json:"temperature_after" form:"temperature_after"`
	PulseFrequencyAfter          float64 `gorm:"column:pulse_frequency_after" json:"pulse_frequency_after" form:"pulse_frequency_after"`
	BreathingRateAfter           float64 `gorm:"column:breathing_rate_after" json:"breathing_rate_after" form:"breathing_rate_after"`
	SystolicBloodPressureAfter   float64 `gorm:"column:systolic_blood_pressure_after" json:"systolic_blood_pressure_after" form:"systolic_blood_pressure_after"`
	DiastolicBloodPressureAfter  float64 `gorm:"column:diastolic_blood_pressure_after" json:"diastolic_blood_pressure_after" form:"diastolic_blood_pressure_after"`
	Status                       int64   `gorm:"column:status" json:"status" form:"status"`
	CreatedTime                  int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
	WeighBeforeTime              int64   `gorm:"column:weigh_before_time" json:"weigh_before_time" form:"weigh_before_time"`
	WeighTime                    int64   `gorm:"column:weigh_time" json:"weigh_time" form:"weigh_time"`
}

func (SignWeight) TableName() string {

	return "xt_sign_weight"
}