db.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package entity
  2. type RedisStuct struct {
  3. Addr []string `json:"addr"`
  4. }
  5. type Mysql struct {
  6. Main *MysqlStruct `json:"main,omitempty"`
  7. BaseService *MysqlStruct `json:"baseService,omitempty"`
  8. CrmService *MysqlStruct `json:"crmService,omitempty"`
  9. }
  10. type Mongo struct {
  11. Main *MongoStruct `json:"main,optional"`
  12. Bidding *MongoStruct `json:"bidding,optional"`
  13. Ent *MongoStruct `json:"ent,optional"`
  14. }
  15. type MongoStruct struct {
  16. Address string `json:"address"`
  17. Size int `json:"size"`
  18. DbName string `json:"dbName"`
  19. UserName string `json:"userName,optional"`
  20. Password string `json:"password,optional"`
  21. Collection string `json:"collection,optional"`
  22. CollectionBack string `json:"collectionBack,optional"`
  23. MaxOpenConns int `json:"maxOpenConns,optional"`
  24. MaxIdleConns int `json:"maxIdleConns,optional"`
  25. }
  26. // mysql
  27. type MysqlStruct struct {
  28. DbName string `json:"dbName"`
  29. Address string `json:"address"`
  30. UserName string `json:"userName"`
  31. Password string `json:"passWord"`
  32. MaxOpenConns int `json:"maxOpenConns"`
  33. MaxIdleConns int `json:"maxIdleConns"`
  34. }
  35. // es
  36. type EsStruct struct {
  37. Addr string `json:"addr"`
  38. Size int `json:"size"`
  39. Version string `json:"version"`
  40. UserName string `json:"userName"`
  41. Password string `json:"password"`
  42. }
  43. const (
  44. TASK = "task" //任务表
  45. FOLLOW_RECORD = "follow_record" //跟进记录表
  46. SALE_CHANCE = "sale_chance" //销售机会
  47. CUSTOM = "custom" //客户表
  48. EMPLOY_INFO = "employ_info" //商业资讯收录表
  49. EMPLOY_CUSTOM = "employ_custom" //候选客户收录表
  50. SALE_CLUE = "sale_clue"
  51. EMPLOY_SUMMARY = "employ_summary"
  52. )