浏览代码

feat: first push

zhangxinlei1996 2 年之前
父节点
当前提交
a801021904
共有 3 个文件被更改,包括 73 次插入0 次删除
  1. 19 0
      entity/code.go
  2. 45 0
      entity/db.go
  3. 9 0
      entity/logx.go

+ 19 - 0
entity/code.go

@@ -0,0 +1,19 @@
+package entity
+
+import "errors"
+
+//表代码
+const (
+	CODE_MEDICAL_INSTITUTION_LEVEL = "code_level"
+	CODE_MEDICAL_INSTITUTION_TYPE  = "code_type"
+	DOMAIN_CAPITAL_RETENTION       = "capital_retention"
+	TableDomainEntClaim            = "domain_ent_claim"     // 认领表
+	TableCompanyBasInfo            = "company_baseinfo"     // 企业信息表
+	TableCodeArea                  = "code_area"            // 区域代码表
+	TableInstitutionBaseInfo       = "institution_baseinfo" // 机构信息表
+)
+
+var (
+	RepeatErr  = errors.New("重复操作")
+	OperateErr = errors.New("操作失败")
+)

+ 45 - 0
entity/db.go

@@ -0,0 +1,45 @@
+package entity
+
+import (
+	"app.yhyue.com/moapp/jybase/mongodb"
+	"app.yhyue.com/moapp/jybase/mysql"
+)
+
+type MysqlMainStruct struct {
+	DbName       string `json:"dbName"`
+	Address      string `json:"address"`
+	UserName     string `json:"userName"`
+	PassWord     string `json:"passWord"`
+	MaxOpenConns int    `json:"maxOpenConns"`
+	MaxIdleConns int    `json:"maxIdleConns"`
+}
+
+type EsStruct struct {
+	Addr string `json:"addr"`
+	Size int    `json:"size"`
+}
+
+var (
+	Mysql            *mysql.Mysql
+	BaseMysql        *mysql.Mysql
+	GlobalCommonData *mysql.Mysql
+	MgoJy            *mongodb.MongodbSim
+)
+
+type Conn struct {
+	Mysql     *mysql.Mysql
+	BaseMysql *mysql.Mysql
+	MgoJy     *mongodb.MongodbSim
+}
+
+type MongoStruct struct {
+	Address        string `json:"address"`
+	Size           int    `json:"size"`
+	DbName         string `json:"dbName"`
+	UserName       string `json:"userName,optional"`
+	Password       string `json:"password,optional"`
+	Collection     string `json:"collection,optional"`
+	CollectionBack string `json:"collectionBack,optional"`
+	MaxOpenConns   int    `json:"maxOpenConns,optional"`
+	MaxIdleConns   int    `json:"maxIdleConns,optional"`
+}

+ 9 - 0
entity/logx.go

@@ -0,0 +1,9 @@
+package entity
+
+//日志信息
+type Logc struct {
+	Mode     string
+	Path     string
+	Level    []string
+	KeepDays int
+}