278713765c
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 1s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 31s
CI / equipment (push) Successful in 30s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 1s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 1s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
109 lines
9.4 KiB
Go
109 lines
9.4 KiB
Go
package dao
|
|
|
|
import "lone-services/pkg/utils"
|
|
|
|
const (
|
|
FacialTypeOrdinary = 0 // 面膜类型 0普通型
|
|
FacialTypeTry = 1 // 面膜类型 1试用型
|
|
FacialTypeAll = 2 // 面膜类型 2通用型
|
|
FacialTypeOnce = 3 // 面膜类型 3一次性型
|
|
)
|
|
|
|
type MaskInfo struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
FacialMaskId string `gorm:"column:facial_mask_id;type:varchar(64);comment:面膜id;NOT NULL" json:"facial_mask_id"`
|
|
HostCode string `gorm:"column:host_code;type:varchar(64);comment:使用的设备序列号;NOT NULL" json:"host_code"`
|
|
Openid string `gorm:"column:openid;type:varchar(128);comment:使用用户的id;NOT NULL" json:"openid"`
|
|
UseTime string `gorm:"column:use_time;type:varchar(64);comment:使用的时间;NOT NULL" json:"use_time"`
|
|
SecondUseTime string `gorm:"column:second_use_time;type:varchar(64);comment:第二次使用的时间,与第一次不能超过半小时" json:"second_use_time"`
|
|
Voltage string `gorm:"column:voltage;type:varchar(64);comment:电压;NOT NULL" json:"voltage"`
|
|
ElectricCurrent string `gorm:"column:electric_current;type:varchar(64);comment:电流;NOT NULL" json:"electric_current"`
|
|
GearPosition string `gorm:"column:gear_position;type:varchar(64);comment:档位;NOT NULL" json:"gear_position"`
|
|
Efficiency string `gorm:"column:efficiency;type:varchar(64);comment:效率;NOT NULL" json:"efficiency"`
|
|
Resistance string `gorm:"column:resistance;type:varchar(64);comment:阻值;NOT NULL" json:"resistance"`
|
|
Score string `gorm:"column:score;type:varchar(64);comment:评分;NOT NULL" json:"score"`
|
|
ProduceTime string `gorm:"column:produce_time;type:varchar(64);comment:生产日期;NOT NULL" json:"produce_time"`
|
|
QualityGuaranteePeriod int64 `gorm:"column:quality_guarantee_period;type:int(11);default:36;comment:保质期月份;NOT NULL" json:"quality_guarantee_period"`
|
|
IsUse int64 `gorm:"column:is_use;type:tinyint(1);default:2;comment:1是已使用;NOT NULL" json:"is_use"`
|
|
IsOnTrial int32 `gorm:"column:is_on_trial;type:tinyint(1);default:2;comment:1是试用 2是正常;NOT NULL" json:"is_on_trial"`
|
|
IsOnline int32 `gorm:"column:is_online;type:tinyint(1);comment:是否为线上,1为线上,2为线下" json:"is_online"`
|
|
StoreId int32 `gorm:"column:store_id;type:int(11);default:0;comment:门店ID;NOT NULL" json:"store_id"`
|
|
WorkerGroupId int64 `gorm:"column:worker_group_id;type:int(11);default:0;comment:组ID" json:"worker_group_id"`
|
|
ModelId int64 `gorm:"column:model_id;type:int(11);default:0" json:"model_id"`
|
|
Model string `gorm:"column:model;type:varchar(64);comment:面膜型号;NOT NULL" json:"model"`
|
|
Effect int64 `gorm:"column:effect;type:tinyint(4);comment:效果0=智能,1=美白,2=淡斑,3=抗衰,4=祛痘" json:"effect"`
|
|
UseScenario int32 `gorm:"column:use_scenario;type:tinyint(1);comment:使用场景,0为院线,1为家用" json:"use_scenario"`
|
|
IsStore int32 `gorm:"column:is_store;type:tinyint(1);default:1;comment:是否为门店产品,1为门店线下,2为线上" json:"is_store"`
|
|
Batch string `gorm:"column:batch;type:varchar(64);comment:批次;NOT NULL" json:"batch"`
|
|
AddType int32 `gorm:"column:add_type;type:tinyint(1);default:1;comment:添加方式:1为系统录入,2为异常录入" json:"add_type"`
|
|
Status int32 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为删除" json:"status"`
|
|
}
|
|
|
|
type MaskCreate struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
FacialMaskId string `gorm:"column:facial_mask_id;type:varchar(64);comment:面膜id;NOT NULL" json:"facial_mask_id"`
|
|
ProduceTime string `gorm:"column:produce_time;type:varchar(64);comment:生产日期;NOT NULL" json:"produce_time"`
|
|
QualityGuaranteePeriod int64 `gorm:"column:quality_guarantee_period;type:int(11);default:36;comment:保质期月份;NOT NULL" json:"quality_guarantee_period"`
|
|
IsOnTrial int32 `gorm:"column:is_on_trial;type:tinyint(1);default:2;comment:1是试用 2是正常;NOT NULL" json:"is_on_trial"`
|
|
IsOnline int32 `gorm:"column:is_online;type:tinyint(1);comment:是否为线上,1为线上,2为线下" json:"is_online"`
|
|
WorkerGroupId int64 `gorm:"column:worker_group_id;type:int(11);default:0;comment:组ID" json:"worker_group_id"`
|
|
ModelId int64 `gorm:"column:model_id;type:int(11);default:0" json:"model_id"`
|
|
Effect int32 `gorm:"column:effect;type:tinyint(4);comment:效果0=智能,1=美白,2=淡斑,3=抗衰,4=祛痘" json:"effect"`
|
|
Model string `gorm:"column:model;type:varchar(64);comment:面膜型号;NOT NULL" json:"model"`
|
|
IsStore int32 `gorm:"column:is_store;type:tinyint(1);default:1;comment:是否为门店产品,1为门店线下,2为线上" json:"is_store"`
|
|
UseScenario int32 `gorm:"column:use_scenario;type:tinyint(1);comment:使用场景,0为院线,1为家用" json:"use_scenario"`
|
|
Batch string `gorm:"column:batch;type:varchar(64);comment:批次;NOT NULL" json:"batch"`
|
|
}
|
|
|
|
type MaskStatus struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
Status int32 `gorm:"column:status;type:tinyint(1);default:1;comment:状态,1为正常,2为删除" json:"status"`
|
|
}
|
|
|
|
type MaskAddInfo struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
FacialMaskId string `gorm:"column:facial_mask_id;type:varchar(64);comment:面膜id;NOT NULL" json:"facial_mask_id"`
|
|
IsOnTrial int32 `gorm:"column:is_on_trial;type:tinyint(1);default:2;comment:1是试用 2是正常;NOT NULL" json:"is_on_trial"`
|
|
IsOnline int32 `gorm:"column:is_online;type:tinyint(1);comment:是否为线上,1为线上,2为线下" json:"is_online"`
|
|
Effect int32 `gorm:"column:effect;type:tinyint(4);comment:效果0=智能,1=美白,2=淡斑,3=抗衰,4=祛痘" json:"effect"`
|
|
Model string `gorm:"column:model;type:varchar(64);comment:面膜型号;NOT NULL" json:"model"`
|
|
IsStore int32 `gorm:"column:is_store;type:tinyint(1);default:1;comment:是否为门店产品,1为门店线下,2为线上" json:"is_store"`
|
|
UseScenario int32 `gorm:"column:use_scenario;type:tinyint(1);comment:使用场景,0为院线,1为家用" json:"use_scenario"`
|
|
Batch string `gorm:"column:batch;type:varchar(64);comment:批次;NOT NULL" json:"batch"`
|
|
CreatedAt utils.CustomTime `gorm:"column:created_at;type:timestamp;default:CURRENT_TIMESTAMP" json:"created_at"`
|
|
}
|
|
|
|
type MaskUseInfo struct {
|
|
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
|
FacialMaskId string `gorm:"column:facial_mask_id;type:varchar(64);comment:面膜id;NOT NULL" json:"facial_mask_id"`
|
|
IsOnTrial int32 `gorm:"column:is_on_trial;type:tinyint(1);default:2;comment:1是试用 2是正常;NOT NULL" json:"is_on_trial"`
|
|
HostCode string `gorm:"column:host_code;type:varchar(64);comment:使用的设备序列号;NOT NULL" json:"host_code"`
|
|
Openid string `gorm:"column:openid;type:varchar(128);comment:使用用户的id;NOT NULL" json:"openid"`
|
|
UserId int64 `json:"user_id" gorm:"user_id"` // 使用的用户ID
|
|
UseTime string `gorm:"column:use_time;type:varchar(64);comment:使用的时间;NOT NULL" json:"use_time"`
|
|
SecondUseTime string `gorm:"column:second_use_time;type:varchar(64);comment:第二次使用的时间,与第一次不能超过半小时" json:"second_use_time"`
|
|
Voltage string `gorm:"column:voltage;type:varchar(64);comment:电压;NOT NULL" json:"voltage"`
|
|
ElectricCurrent string `gorm:"column:electric_current;type:varchar(64);comment:电流;NOT NULL" json:"electric_current"`
|
|
GearPosition string `gorm:"column:gear_position;type:varchar(64);comment:档位;NOT NULL" json:"gear_position"`
|
|
Efficiency string `gorm:"column:efficiency;type:varchar(64);comment:效率;NOT NULL" json:"efficiency"`
|
|
Resistance string `gorm:"column:resistance;type:varchar(64);comment:阻值;NOT NULL" json:"resistance"`
|
|
Score string `gorm:"column:score;type:varchar(64);comment:评分;NOT NULL" json:"score"`
|
|
IsUse int32 `gorm:"column:is_use;type:tinyint(1);default:2;comment:1是已使用;NOT NULL" json:"is_use"`
|
|
StoreId int64 `gorm:"column:store_id;type:int(11);default:0;comment:门店ID;NOT NULL" json:"store_id"`
|
|
IsStore int32 `gorm:"column:is_store;type:tinyint(1);default:1;comment:是否为门店产品,1为门店线下,2为线上" json:"is_store"`
|
|
}
|
|
|
|
type MaskUsedInfo struct {
|
|
FacialMaskId string `gorm:"column:facial_mask_id;type:varchar(64);comment:面膜id;NOT NULL" json:"facial_mask_id"`
|
|
UseTime string `gorm:"column:use_time;type:varchar(64);comment:使用的时间;NOT NULL" json:"use_time"`
|
|
SecondUseTime string `gorm:"column:second_use_time;type:varchar(64);comment:第二次使用的时间,与第一次不能超过半小时" json:"second_use_time"`
|
|
}
|
|
|
|
type UserInfo struct {
|
|
Id int64 ` json:"id"`
|
|
}
|
|
|
|
type StoreInfo struct {
|
|
Id int64 ` json:"id"`
|
|
}
|