2022-11-28 16:38:30 +08:00
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
type Customer struct {
|
|
|
|
|
Id int64 `gorm:"primaryKey"`
|
|
|
|
|
Name string `gorm:"name"`
|
|
|
|
|
Source string `gorm:"source"`
|
|
|
|
|
Phone string `gorm:"phone"`
|
|
|
|
|
Email string `gorm:"email"`
|
|
|
|
|
Industry string `gorm:"industry"`
|
|
|
|
|
Level string `gorm:"level"`
|
|
|
|
|
Remarks string `gorm:"remarks"`
|
|
|
|
|
Region string `gorm:"region"`
|
|
|
|
|
Address string `gorm:"address"`
|
|
|
|
|
Status int `gorm:"status"`
|
|
|
|
|
Creator int64 `gorm:"creator"`
|
|
|
|
|
Created int64 `gorm:"created"`
|
|
|
|
|
Updated int64 `gorm:"updated"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerCreateParam struct {
|
2022-12-10 22:57:58 +08:00
|
|
|
Name string `json:"name" binding:"required"`
|
|
|
|
|
Source string `json:"source" binding:"-"`
|
|
|
|
|
Phone string `json:"phone" binding:"omitempty,len=11"`
|
|
|
|
|
Email string `json:"email" binding:"omitempty,email"`
|
|
|
|
|
Industry string `json:"industry" binding:"-"`
|
|
|
|
|
Level string `json:"level" binding:"-"`
|
|
|
|
|
Remarks string `json:"remarks" binding:"-"`
|
|
|
|
|
Region string `json:"region" binding:"-"`
|
|
|
|
|
Address string `json:"address" binding:"-"`
|
|
|
|
|
Status int `json:"status" binding:"-"`
|
|
|
|
|
Creator int64 `json:"creator,omitempty" binding:"-"`
|
2022-11-28 16:38:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerUpdateParam struct {
|
2022-12-10 22:57:58 +08:00
|
|
|
Id int64 `json:"id" binding:"required"`
|
|
|
|
|
Name string `json:"name" binding:"-"`
|
|
|
|
|
Source string `json:"source" binding:"-"`
|
|
|
|
|
Phone string `json:"phone" binding:"omitempty,len=11"`
|
|
|
|
|
Email string `json:"email" binding:"omitempty,email"`
|
|
|
|
|
Industry string `json:"industry" binding:"-"`
|
|
|
|
|
Level string `json:"level" binding:"-"`
|
|
|
|
|
Remarks string `json:"remarks" binding:"-"`
|
|
|
|
|
Region string `json:"region" binding:"-"`
|
|
|
|
|
Address string `json:"address" binding:"-"`
|
|
|
|
|
Status int `json:"status" binding:"-"`
|
2022-11-28 16:38:30 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-24 20:03:35 +08:00
|
|
|
type CustomerSendMailParam struct {
|
2023-01-30 15:50:10 +08:00
|
|
|
Uid int64 `json:"uid" binding:"-"`
|
|
|
|
|
Receiver string `json:"receiver" binding:"required,email"`
|
|
|
|
|
Subject string `json:"subject" binding:"omitempty,gt=0"`
|
|
|
|
|
Content string `json:"content" binding:"required,gt=0"`
|
|
|
|
|
Attachment string `json:"attachment" binding:"omitempty,gt=0"`
|
2023-01-24 20:03:35 +08:00
|
|
|
}
|
|
|
|
|
|
2022-11-28 16:38:30 +08:00
|
|
|
type CustomerDeleteParam struct {
|
2022-12-10 22:57:58 +08:00
|
|
|
Ids []int64 `json:"ids" binding:"required"`
|
2022-11-28 16:38:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerQueryParam struct {
|
2023-02-03 19:55:45 +08:00
|
|
|
Id int64 `form:"id" binding:"omitempty,gt=0"`
|
|
|
|
|
Name string `form:"name" binding:"omitempty,gt=0"`
|
|
|
|
|
Source string `form:"source" binding:"omitempty,gt=0"`
|
|
|
|
|
Industry string `form:"industry" binding:"omitempty,gt=0"`
|
|
|
|
|
Level string `form:"level" binding:"omitempty,gt=0"`
|
|
|
|
|
Status int `form:"status" binding:"omitempty,oneof=1 2"`
|
|
|
|
|
Creator int64 `form:"creator,omitempty" binding:"-"`
|
|
|
|
|
Page Page
|
2022-11-28 16:38:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerList struct {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Source string `json:"source"`
|
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Industry string `json:"industry"`
|
|
|
|
|
Level string `json:"level"`
|
|
|
|
|
Remarks string `json:"remarks"`
|
|
|
|
|
Region string `json:"region"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
Status int `json:"status"`
|
|
|
|
|
Created int64 `json:"created"`
|
|
|
|
|
Updated int64 `json:"updated"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerInfo struct {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Source string `json:"source"`
|
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Industry string `json:"industry"`
|
|
|
|
|
Level string `json:"level"`
|
|
|
|
|
Remarks string `json:"remarks"`
|
|
|
|
|
Region string `json:"region"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
Status int `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CustomerOption struct {
|
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|
2022-12-27 19:18:58 +08:00
|
|
|
|
|
|
|
|
type CustomerExcelRow struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Source string `json:"source"`
|
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Industry string `json:"industry"`
|
|
|
|
|
Level string `json:"level"`
|
|
|
|
|
Remarks string `json:"remarks"`
|
|
|
|
|
Region string `json:"region"`
|
|
|
|
|
Address string `json:"address"`
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
Creator int64 `json:"creator"`
|
|
|
|
|
Created string `json:"created"`
|
|
|
|
|
Updated string `json:"updated"`
|
|
|
|
|
}
|