consumer.go 12.4 KB
Newer Older
haoyanbin's avatar
1  
haoyanbin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
package models

type ConsumerAnalysis struct {
	Arrival       int            `json:"arrival" description:"到店顾客数"`
	PayNumber     int            `json:"pay_number" description:"支付笔数"`
	ShopCustomers []ShopCustomer `json:"new_and_old_customer" description:"到店顾客 柱状图"`
}

type ShopCustomer struct {
	Date   string `json:"date" description:"时间"`
	Type   string `json:"type" description:"到店顾客 还是支付笔数"`
	Number int    `json:"number" description:"顾客数"`
}

type Annular struct {
	ConsumerSourceSum     int                  `json:"consumer_source_sum" description:"顾客来源总人数"`
	ConsumerSources       []ConsumerSource     `json:"consumer_sources" description:"顾客来源model"`
	ConsumerDistributeSum int                  `json:"consumer_distribute_sum" description:"顾客分布总人数"`
	ConsumerDistributes   []ConsumerDistribute `json:"consumer_distributes" description:"顾客分布model"`
}

/**

const data = [
        { type: '大众点评', cost: 150, a: '1' },
        { type: '美团', cost: 80, a: '1' },
        { type: '宣传图', cost: 70, a: '1' },
        { type: '朋友推荐', cost: 40, a: '1' },
        { type: '附近', cost: 35, a: '1' },
        { type: '其他', cost: 35, a: '1' }
      ];

*/

type ConsumerSource struct {
	Type string `json:"type" description:"顾客来源"`
	Cost int    `json:"cost" description:"人数"`
	A    string `json:"a" description:"前端需要 默认写死 1"`
}

type ConsumerDistribute struct {
	Type string `json:"type" description:"顾客来源"`
	Cost int    `json:"cost" description:"人数"`
	A    string `json:"a" description:"前端需要 默认写死 1"`
}

type ConsumptionRank struct {
	Name  string  `json:"name" description:"顾客姓名"`
	Phone string  `json:"phone" description:"顾客手机号"`
	Money float64 `json:"money" description:"顾客消费"`
}

type CardPreview struct {
	MoneySum        float64 `json:"money_sum" description:"实充金额"`
	PresentMoneySum float64 `json:"present_money_sum" description:"赠送金额"`
	ExpendMoney     float64 `json:"expend_money" description:"支出总金额"`
	AddConsumer     int     `json:"add_consumer" description:"新增会员数量"`
	ConsumerSum     int     `json:"consumer_sum" description:"会员总数量"`
}

type CardPreviewChartTemp struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type CardPreviewChart struct {
	Type  string  `json:"type" description:"支出或赠送金额或实充金额 类型"`
	Value float64 `json:"value" description:"金额"`
	Name  string  `json:"name" description:"会员卡或次卡的名称"`
}

type CardChartTemp struct {
	CardID       int
	Money        float64
	PresentMoney float64
	ExpendMoney  float64
}

type CardType struct {
	ID       int    `json:"id" description:"会员卡 id"`
	Type     int    `json:"type" description:"会员卡 1  次卡2"`
	CardName string `json:"card_name" description:"卡名称"`
}

type CardDetailInfo struct {
	MoneySum        float64       `json:"money_sum" description:"实充金额 总额"`
	PresentMoneySum float64       `json:"present_money" description:"赠送金额 总额"`
	ExpendMoneySum  float64       `json:"expend_money_sum" description:"支出 总额"`
	CardDetails     []*CardDetail `json:"card_details" description:"列表数据"`
}

type CardDetail struct {
	Time         string  `json:"time" description:"时间"`
	ConsumerName string  `json:"consumer_name" description:"顾客姓名"`
	Type         string  `json:"type" description:"卡片使用类型 1发卡 2充值 3消费 4退卡"`
	Money        float64 `json:"money" description:"金额"`
	PresentMoney float64 `json:"present_money" description:"赠送金额"`
}

type CreateConsumer struct {
	ConsumerDetail Consumer `json:"consumer_detail"`
	PetDetail      Pet      `json:"pet_detail"`
}

type Consumer struct {
	ID              int    `json:"id"`
	Name            string `json:"name"`
	Namepy          string `json:"namepy"`
	Telephone       string `json:"telephone"`
	BackUpTelephone string `json:"back_up_telephone"` // 第二手机号即是备用手机号
	Birthday        string `json:"birthday"`
	Sex             int    `json:"sex"`
	Address         string `json:"address"`
	Email           string `json:"email"`
	Age             int    `json:"age"`
	// 了解途径
	Understand string `json:"understand"`
	// 积分
	Bonus float64 `json:"bonus"`
	// 押金金额
	DepositMoney float64 `json:"deposit_money"`
	// 添加时间
	AddTime string `json:"add_time"`
	//make an appointment
	// 1 是修改  0是 不修改
	MakeAnAppointmentTag int `json:"make_an_appointment_tag"`
	// 是否是黑名单
	IsBlackList int `json:"is_black_list"`
	// 黑名单内容
	BlackList    string `json:"black_list"`
	Tags         []Tag  `json:"consumer_tags"`
	IsChain      int    `json:"is_chain" description:"是不是其他它连锁机构 0:本医院 1:其它连锁医院"`
	HospitalID   int64  `json:"hospital_id" description:"医院ID"`
	HospitalCode string `json:"hospital_code" description:"医院注册码"`
	HospitalName string `json:"hospital_name" description:"医院名称"`
}

type Tag struct {
	ID      int64  `json:"id"`
	Content string `json:"content"`
}

type ConsumerBlackList struct {
	IsBlackList  uint8  `json:"is_black_list" description:"是否是黑名单用户 0 不是  1 是"`
	BlackList    string `json:"black_list" description:"黑名单内容"`
	Phone        string `json:"phone" description:"手机号"`
	HospitalCode string `json:"hospital_code" description:"医院码"`
	LocalID      int    `json:"local_id" description:"顾客本地id"`
}

type ConsumerTag struct {
	ID         int64  `json:"id,omitempty"`
	TagContent string `json:"tag_content"`
}

type ConsumerUploadModel struct {
	Address         string `json:"address"`
	Addtime         string `json:"addtime"`
	Birthday        string `json:"birthday"`
	ConsumerLocalID int64  `json:"consumer_local_id"`
	Delflag         int    `json:"delflag"`
	Discription     string `json:"discription"`
	Email           string `json:"email"`
	Hospitalcode    string `json:"hospitalcode"`
	Level           int    `json:"level"`
	Name            string `json:"name"`
	Sex             int    `json:"sex"`
	Telephone       string `json:"telephone"`
	IsBlackList     int    `json:"is_black_list"`
	BlackList       string `json:"black_list"`
}

type Consumers struct {
	ID              int    `json:"id"`
	Name            string `json:"name"`
	Namepy          string `json:"namepy"`
	Telephone       string `json:"telephone"`
	BackUpTelephone string `json:"back_up_telephone"` // 第二手机号即是备用手机号
	Birthday        string `json:"birthday"`
	Sex             int    `json:"sex"`
	Address         string `json:"address"`
	Email           string `json:"email"`
	// 了解途径
	Understand string `json:"understand"`
	// 积分
	Bonus float64 `json:"bonus"`
	// 押金金额
	DepositMoney float64 `json:"deposit_money"`
	// 添加时间
	AddTime          string             `json:"add_time"`
	HospitalID       int64              `json:"hospital_id" description:"医院ID"`
	HospitalCode     string             `json:"hospital_code" description:"医院注册码"`
	HospitalName     string             `json:"hospital_name" description:"医院名称"`
	Pets             []Pet              `json:"pets"`
	CardAndMeterCard []CardAndMeterCard `json:"card_and_meter_card"`
}

type CardAndMeterCard struct {
	// 通用字段
	ID   int    `json:"id"`
	Code string `json:"code"`
	// 根据type 判断是会员卡还是次卡  1 会员卡 2 次卡
	Type            int    `json:"type"`
	ConCardTypeID   int    `json:"con_card_type_id"`
	ConCardTypeName string `json:"con_card_type_name"`
	// 会员卡专用字段
	CreateTime string `json:"create_time"`
	// 剩余多少钱
	Money         float64 `json:"money"`
	IsusePassword int     `json:"isuse_password"`
	Password      string  `json:"password"`
	// 赠送额度剩余多少钱
	PresentMoney float64 `json:"present_money"`
	// 次卡专用 字段
	// 剩余次数
	Meter int `json:"meter"`
	// 到期时间
	Overtime string `json:"overtime"`
	// 开始时间
	Opentime string `json:"opentime"`

	Off float64 `json:"off"`
}

type UserAgreement struct {
	ID      int64  `json:"id"`
	Name    string `json:"name"`
	Content string `json:"content"`
}

type Pet struct {
	ID            int `json:"id"`
	HisConsumerId int `json:"his_consumer_id"`
	// 宠物头像
	HeadPortrait string `json:"head_portrait"`
	// 宠物名称
	PetName   string `json:"pet_name"`
	PetNamepy string `json:"pet_namepy"`
	// 宠物编号
	PetCode string `json:"pet_code"`
	// 宠物生日
	PetBirthday string `json:"pet_birthday"`
	// 性别
	PetSex int `json:"pet_sex"`
	// 毛色
	CoatColor string `json:"coat_color"`
	// 种类
	Kind      string `json:"kind"`
	ConKindId int    `json:"con_kind_id"`
	// 品种
	ConSpeciesID int    `json:"con_species_id"`
	Species      string `json:"species"`
	SpeciesPy    string `json:"species_py"`
	// 死亡标记
	IsDead int `json:"is_dead"`
	// 是否免疫
	IsImmunity int `json:"is_immunity"`
	// 是否去势
	IsSterilized int `json:"is_sterilized"`
	// 是否驱虫
	IsInsecticide int `json:"is_insecticide"`
	// 备注
	Discription string `json:"discription"`

	AddTime string `json:"add_time"`

	Weight           string `json:"weight"`
	IsChain          int    `json:"is_chain" description:"是不是其他它连锁机构 0:本医院 1:其它连锁医院"`
	HospitalID       int64  `json:"hospital_id" description:"医院ID"`
	HospitalCode     string `json:"hospital_code" description:"医院注册码"`
	HospitalName     string `json:"hospital_name" description:"医院名称"`
	SysFileID        int    `json:"sys_file_id" description:"宠物照片文件id"`
	SyncAppointment  int    `json:"sync_appointment" description:"是否同时修改预约  0 不修改  1 修改"`
	SysFileGuid      string `json:"sys_file_guid"`
	SysFileExtension string `json:"sys_file_extension"`
}

type Data struct {
	Code int8        `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type ConsumerListCondition struct {
	IsChain  int    `json:"is_chain" form:"is_chain"`
	Keyword  string `json:"keyword" form:"keyword"`
	Type     int    `json:"type" form:"type"` // 1 全部 2 顾客姓名 3 手机号 4 宠物名称  5 宠物编号 6 会员卡类型  7 会员卡号  8 宠物品种
	Page     int64  `json:"page" form:"page"`
	PageSize int64  `json:"page_size" form:"page_size"`
}

type PetCode struct {
	Code string `json:"code" description:"宠物编号"`
}

type AppointmentParam struct {
	ID                int64  `json:"id" description:"预约单 id"`
	ConsumerID        string `json:"consumer_id" description:"顾客id"`
	ConsumerName      string `json:"consumer_name" description:"顾客名称"`
	ConsumerPhone     string `json:"consumer_phone" description:"顾客手机号"`
	ProjectID         int    `json:"project_id" description:"预约类型id"`
	ProjectName       string `json:"project_name" description:"预约类型名称"`
	PetID             string `json:"pet_id" description:"宠物id"`
	PetName           string `json:"pet_name" description:"宠物名称"`
	DoctorID          int    `json:"doctor_id" description:"医生id"`
	DoctorName        string `json:"doctor_name" description:"医生名称"`
	AppointmentTime   string `json:"appointment_time" description:"到院时间"`
	Description       string `json:"description" description:"描述"`
	HospitalCode      string `json:"hospital_code" description:"医院code"`
	IspreWeixinnotify int    `json:"ispre_weixinnotify"`
	IspreSmsnotify    int    `json:"ispre_smsnotify"`
	IscurWeixinnotify int    `json:"iscur_weixinnotify"`
	IscurSmsnotify    int    `json:"iscur_smsnotify"`
	PreWeixinnum      int    `json:"pre_weixinnum"`
	PreSmsnum         int    `json:"pre_smsnum"`
}

type AppointmentType struct {
	ID   int    `json:"id" description:"预约类型id"`
	Name string `json:"name" description:"预约类型名称"`
}

type AppointmentInfo struct {
	AppointmentType []AppointmentType `json:"appointment_type"`
	ReminderList    interface{}       `json:"reminder_list"`
}

type PreviewFileParam struct {
	ConsumerId string `json:"consumer_id" form:"consumer_id"`
	PetId      string `json:"pet_id" form:"pet_id"`
}

type QuestionLogin struct {
	Code int `json:"code"`
	Data struct {
		Token          string `json:"token"`
		HospitalName   string `json:"hospital_name"`
		HospitalCode   string `json:"hospital_code"`
		HospitalAvatar string `json:"hospital_avatar"`
	} `json:"data"`
	Msg string `json:"msg"`
}

type SaasFileCurrency struct {
	Code int         `json:"code"`
	Data interface{} `json:"data"`
	Msg  string      `json:"msg"`
}