config.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package main
  2. import "time"
  3. type GlobalConf struct {
  4. MongoP MgoConf
  5. MongoB MgoConf
  6. Mongo181 MgoConf
  7. Env EnvConf
  8. Mysql MysqlConf
  9. Log Log
  10. Es EsConf
  11. }
  12. type MgoConf struct {
  13. Host string
  14. DB string
  15. Coll string // 查询表
  16. Username string
  17. Password string
  18. Size int
  19. Direct bool
  20. }
  21. type Log struct {
  22. LogPath string
  23. MaxSize int
  24. Compress bool
  25. MaxAge int
  26. MaxBackups int
  27. LogLevel string
  28. Format string
  29. }
  30. type EnvConf struct {
  31. File string
  32. Sheet string
  33. Savecoll string
  34. BidFields []string
  35. NjFields []string
  36. }
  37. type MysqlConf struct {
  38. Address string
  39. Dbname string
  40. Dbname2 string
  41. Dbname3 string
  42. Username string
  43. Password string
  44. Table string
  45. Table2 string
  46. Table3 string
  47. Table4 string
  48. Table5 string
  49. Table6 string
  50. Table7 string
  51. Stime string
  52. Etime string
  53. Test bool
  54. }
  55. type EsConf struct {
  56. URL string
  57. Username string
  58. Password string
  59. Index string
  60. }
  61. type DwdFnzjFollowRecord struct {
  62. ID uint64 `gorm:"column:id;primaryKey;autoIncrement;not null;comment:自增主键" json:"id"`
  63. ProposedID string `gorm:"column:proposed_id;type:varchar(32);not null;comment:拟在建项目ID" json:"proposed_id"`
  64. InfoID string `gorm:"column:infoid;type:varchar(32);comment:标讯id" json:"infoid"`
  65. Title string `gorm:"column:title;type:varchar(500);comment:标题" json:"title"`
  66. FollowNum string `gorm:"column:follow_num;type:varchar(15);comment:跟进数量" json:"follow_num"`
  67. ProjectStageCode string `gorm:"column:project_stage_code;type:varchar(100);comment:进展阶段" json:"project_stage_code"`
  68. JYBXHref string `gorm:"column:jybxhref;type:varchar(500);comment:剑鱼标讯链接" json:"jybxhref"`
  69. ProjectScale string `gorm:"column:project_scale;type:text;comment:建设规模及建设内容" json:"project_scale"`
  70. PublishTime *time.Time `gorm:"column:publishtime;type:datetime;comment:跟进时间(发布时间)" json:"publishtime"`
  71. CreateTime time.Time `gorm:"column:createtime;type:datetime;not null;comment:创建时间" json:"createtime"`
  72. }
  73. // TableName sets the insert table name for this struct type
  74. func (DwdFnzjFollowRecord) TableName() string {
  75. return "dwd_f_nzj_follw_record"
  76. }