jianglw 4 роки тому
батько
коміт
addf2afa24

+ 3 - 3
config/config.toml

@@ -31,13 +31,13 @@
 [database]
     [[database.default]]
         Debug = true
-        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_dev"
+        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_test"
     [[database.CU7zm9WhZm]]
         Debug = true
-        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_test"
+        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_dev"
     [[database.EmGVD5szuT]]
         Debug = true
-        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_dev"
+        link = "mysql:root:Dashoo#190801@ali@tcp(192.168.0.252:3306)/lims_test"
 
 [micro_srv]
     auth = "dashoo.labsop.auth-2.1"

+ 36 - 0
dao/base_equipment_advance_time.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package dao
+
+import (
+	"lims_adapter/dao/internal"
+)
+
+// baseEquipmentAdvanceTimeDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type baseEquipmentAdvanceTimeDao struct {
+	internal.BaseEquipmentAdvanceTimeDao
+}
+
+var (
+	// BaseEquipmentAdvanceTime is globally public accessible object for table base_equipment_advance_time operations.
+	BaseEquipmentAdvanceTime = baseEquipmentAdvanceTimeDao{
+		internal.BaseEquipmentAdvanceTime,
+	}
+)
+
+type BaseEquipmentAdvanceTimeDao struct {
+	internal.BaseEquipmentAdvanceTimeDao
+}
+
+func NewBaseEquipmentAdvanceTimeDao(tenant string) *BaseEquipmentAdvanceTimeDao {
+	dao := internal.NewBaseEquipmentAdvanceTimeDao(tenant)
+	return &BaseEquipmentAdvanceTimeDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 36 - 0
dao/base_itemdetails.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package dao
+
+import (
+	"lims_adapter/dao/internal"
+)
+
+// baseItemdetailsDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type baseItemdetailsDao struct {
+	internal.BaseItemdetailsDao
+}
+
+var (
+	// BaseItemdetails is globally public accessible object for table base_itemdetails operations.
+	BaseItemdetails = baseItemdetailsDao{
+		internal.BaseItemdetails,
+	}
+)
+
+type BaseItemdetailsDao struct {
+	internal.BaseItemdetailsDao
+}
+
+func NewBaseItemdetailsDao(tenant string) *BaseItemdetailsDao {
+	dao := internal.NewBaseItemdetailsDao(tenant)
+	return &BaseItemdetailsDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 25 - 0
dao/base_user.go

@@ -0,0 +1,25 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package dao
+
+import (
+	internal2 "lims_adapter/dao/internal"
+)
+
+// baseUserDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type baseUserDao struct {
+	internal2.BaseUserDao
+}
+
+var (
+	// BaseUser is globally public accessible object for table base_user operations.
+	BaseUser = baseUserDao{
+		internal2.BaseUser,
+	}
+)
+
+// Fill with you ideas below.

+ 36 - 0
dao/instrument.go

@@ -0,0 +1,36 @@
+// ============================================================================
+// This is auto-generated by gf cli tool only once. Fill this file as you wish.
+// ============================================================================
+
+package dao
+
+import (
+	"lims_adapter/dao/internal"
+)
+
+// instrumentDao is the manager for logic model data accessing
+// and custom defined data operations functions management. You can define
+// methods on it to extend its functionality as you wish.
+type instrumentDao struct {
+	internal.InstrumentDao
+}
+
+var (
+	// Instrument is globally public accessible object for table instrument operations.
+	Instrument = instrumentDao{
+		internal.Instrument,
+	}
+)
+
+type InstrumentDao struct {
+	internal.InstrumentDao
+}
+
+func NewInstrumentDao(tenant string) *InstrumentDao {
+	dao := internal.NewInstrumentDao(tenant)
+	return &InstrumentDao{
+		dao,
+	}
+}
+
+// Fill with you ideas below.

+ 416 - 0
dao/internal/base_equipment_advance_time.go

@@ -0,0 +1,416 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+	model2 "lims_adapter/model"
+	"time"
+)
+
+// BaseEquipmentAdvanceTimeDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type BaseEquipmentAdvanceTimeDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns baseEquipmentAdvanceTimeColumns
+}
+
+// BaseEquipmentAdvanceTimeColumns defines and stores column names for table base_equipment_advance_time.
+type baseEquipmentAdvanceTimeColumns struct {
+	Id           string // 主键
+	EquipmentId  string // 设备Id
+	Week         string // 星期 1-7为周一到周日
+	StartTime    string // 开始时间 XX:XX
+	EndTime      string // 结束时间 XX:XX
+	CreateUserId string //
+	CreateBy     string //
+	CreateOn     string //
+}
+
+var (
+	// BaseEquipmentAdvanceTime is globally public accessible object for table base_equipment_advance_time operations.
+	BaseEquipmentAdvanceTime = BaseEquipmentAdvanceTimeDao{
+		M:     g.DB("default").Model("base_equipment_advance_time").Safe(),
+		DB:    g.DB("default"),
+		Table: "base_equipment_advance_time",
+		Columns: baseEquipmentAdvanceTimeColumns{
+			Id:           "Id",
+			EquipmentId:  "EquipmentId",
+			Week:         "Week",
+			StartTime:    "StartTime",
+			EndTime:      "EndTime",
+			CreateUserId: "CreateUserId",
+			CreateBy:     "CreateBy",
+			CreateOn:     "CreateOn",
+		},
+	}
+)
+
+func NewBaseEquipmentAdvanceTimeDao(tenant string) BaseEquipmentAdvanceTimeDao {
+	var dao BaseEquipmentAdvanceTimeDao
+	dao = BaseEquipmentAdvanceTimeDao{
+		M:     g.DB(tenant).Model("base_equipment_advance_time").Safe(),
+		DB:    g.DB(tenant),
+		Table: "base_equipment_advance_time",
+		Columns: baseEquipmentAdvanceTimeColumns{
+			Id:           "Id",
+			EquipmentId:  "EquipmentId",
+			Week:         "Week",
+			StartTime:    "StartTime",
+			EndTime:      "EndTime",
+			CreateUserId: "CreateUserId",
+			CreateBy:     "CreateBy",
+			CreateOn:     "CreateOn",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *BaseEquipmentAdvanceTimeDao) Ctx(ctx context.Context) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *BaseEquipmentAdvanceTimeDao) As(as string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *BaseEquipmentAdvanceTimeDao) TX(tx *gdb.TX) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *BaseEquipmentAdvanceTimeDao) Master() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *BaseEquipmentAdvanceTimeDao) Slave() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *BaseEquipmentAdvanceTimeDao) Args(args ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseEquipmentAdvanceTimeDao) LeftJoin(table ...string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseEquipmentAdvanceTimeDao) RightJoin(table ...string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseEquipmentAdvanceTimeDao) InnerJoin(table ...string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseEquipmentAdvanceTimeDao) Fields(fieldNamesOrMapStruct ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseEquipmentAdvanceTimeDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *BaseEquipmentAdvanceTimeDao) Option(option int) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *BaseEquipmentAdvanceTimeDao) OmitEmpty() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *BaseEquipmentAdvanceTimeDao) Filter() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *BaseEquipmentAdvanceTimeDao) Where(where interface{}, args ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *BaseEquipmentAdvanceTimeDao) WherePri(where interface{}, args ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *BaseEquipmentAdvanceTimeDao) And(where interface{}, args ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *BaseEquipmentAdvanceTimeDao) Or(where interface{}, args ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *BaseEquipmentAdvanceTimeDao) Group(groupBy string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *BaseEquipmentAdvanceTimeDao) Order(orderBy ...string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *BaseEquipmentAdvanceTimeDao) Limit(limit ...int) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *BaseEquipmentAdvanceTimeDao) Offset(offset int) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *BaseEquipmentAdvanceTimeDao) Page(page, limit int) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *BaseEquipmentAdvanceTimeDao) Batch(batch int) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *BaseEquipmentAdvanceTimeDao) Cache(duration time.Duration, name ...string) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *BaseEquipmentAdvanceTimeDao) Data(data ...interface{}) *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.BaseEquipmentAdvanceTime.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseEquipmentAdvanceTimeDao) All(where ...interface{}) ([]*model2.BaseEquipmentAdvanceTime, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.BaseEquipmentAdvanceTime
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.BaseEquipmentAdvanceTime.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseEquipmentAdvanceTimeDao) One(where ...interface{}) (*model2.BaseEquipmentAdvanceTime, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.BaseEquipmentAdvanceTime
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *BaseEquipmentAdvanceTimeDao) FindOne(where ...interface{}) (*model2.BaseEquipmentAdvanceTime, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.BaseEquipmentAdvanceTime
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *BaseEquipmentAdvanceTimeDao) FindAll(where ...interface{}) ([]*model2.BaseEquipmentAdvanceTime, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.BaseEquipmentAdvanceTime
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *BaseEquipmentAdvanceTimeDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *BaseEquipmentAdvanceTimeDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *BaseEquipmentAdvanceTimeDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *BaseEquipmentAdvanceTimeDao) Chunk(limit int, callback func(entities []*model2.BaseEquipmentAdvanceTime, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*model2.BaseEquipmentAdvanceTime
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *BaseEquipmentAdvanceTimeDao) LockUpdate() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *BaseEquipmentAdvanceTimeDao) LockShared() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *BaseEquipmentAdvanceTimeDao) Unscoped() *BaseEquipmentAdvanceTimeDao {
+	return &BaseEquipmentAdvanceTimeDao{M: d.M.Unscoped()}
+}

+ 446 - 0
dao/internal/base_itemdetails.go

@@ -0,0 +1,446 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+	"lims_adapter/model"
+	"time"
+)
+
+// BaseItemdetailsDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type BaseItemdetailsDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns baseItemdetailsColumns
+}
+
+// BaseItemdetailsColumns defines and stores column names for table base_itemdetails.
+type baseItemdetailsColumns struct {
+	Id             string //
+	DictCode       string // 字典类型
+	ParentId       string //
+	ItemCode       string //
+	ItemName       string //
+	ItemValue      string //
+	IsDefault      string // 是否默认(1是 0否)
+	Enabled        string // 状态(1正常 0停用
+	AllowEdit      string //
+	AllowDelete    string //
+	SortCode       string //
+	Description    string //
+	CreateOn       string //
+	CreateUserId   string //
+	CreateBy       string //
+	ModifiedOn     string //
+	ModifiedUserId string //
+	ModifiedBy     string //
+}
+
+var (
+	// BaseItemdetails is globally public accessible object for table base_itemdetails operations.
+	BaseItemdetails = BaseItemdetailsDao{
+		M:     g.DB("default").Model("base_itemdetails").Safe(),
+		DB:    g.DB("default"),
+		Table: "base_itemdetails",
+		Columns: baseItemdetailsColumns{
+			Id:             "Id",
+			DictCode:       "DictCode",
+			ParentId:       "ParentId",
+			ItemCode:       "ItemCode",
+			ItemName:       "ItemName",
+			ItemValue:      "ItemValue",
+			IsDefault:      "IsDefault",
+			Enabled:        "Enabled",
+			AllowEdit:      "AllowEdit",
+			AllowDelete:    "AllowDelete",
+			SortCode:       "SortCode",
+			Description:    "Description",
+			CreateOn:       "CreateOn",
+			CreateUserId:   "CreateUserId",
+			CreateBy:       "CreateBy",
+			ModifiedOn:     "ModifiedOn",
+			ModifiedUserId: "ModifiedUserId",
+			ModifiedBy:     "ModifiedBy",
+		},
+	}
+)
+
+func NewBaseItemdetailsDao(tenant string) BaseItemdetailsDao {
+	var dao BaseItemdetailsDao
+	dao = BaseItemdetailsDao{
+		M:     g.DB(tenant).Model("base_itemdetails").Safe(),
+		DB:    g.DB(tenant),
+		Table: "base_itemdetails",
+		Columns: baseItemdetailsColumns{
+			Id:             "Id",
+			DictCode:       "DictCode",
+			ParentId:       "ParentId",
+			ItemCode:       "ItemCode",
+			ItemName:       "ItemName",
+			ItemValue:      "ItemValue",
+			IsDefault:      "IsDefault",
+			Enabled:        "Enabled",
+			AllowEdit:      "AllowEdit",
+			AllowDelete:    "AllowDelete",
+			SortCode:       "SortCode",
+			Description:    "Description",
+			CreateOn:       "CreateOn",
+			CreateUserId:   "CreateUserId",
+			CreateBy:       "CreateBy",
+			ModifiedOn:     "ModifiedOn",
+			ModifiedUserId: "ModifiedUserId",
+			ModifiedBy:     "ModifiedBy",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *BaseItemdetailsDao) Ctx(ctx context.Context) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *BaseItemdetailsDao) As(as string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *BaseItemdetailsDao) TX(tx *gdb.TX) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *BaseItemdetailsDao) Master() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *BaseItemdetailsDao) Slave() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *BaseItemdetailsDao) Args(args ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseItemdetailsDao) LeftJoin(table ...string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseItemdetailsDao) RightJoin(table ...string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseItemdetailsDao) InnerJoin(table ...string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseItemdetailsDao) Fields(fieldNamesOrMapStruct ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseItemdetailsDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *BaseItemdetailsDao) Option(option int) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *BaseItemdetailsDao) OmitEmpty() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *BaseItemdetailsDao) Filter() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *BaseItemdetailsDao) Where(where interface{}, args ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *BaseItemdetailsDao) WherePri(where interface{}, args ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *BaseItemdetailsDao) And(where interface{}, args ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *BaseItemdetailsDao) Or(where interface{}, args ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *BaseItemdetailsDao) Group(groupBy string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *BaseItemdetailsDao) Order(orderBy ...string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *BaseItemdetailsDao) Limit(limit ...int) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *BaseItemdetailsDao) Offset(offset int) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *BaseItemdetailsDao) Page(page, limit int) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *BaseItemdetailsDao) Batch(batch int) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *BaseItemdetailsDao) Cache(duration time.Duration, name ...string) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *BaseItemdetailsDao) Data(data ...interface{}) *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.BaseItemdetails.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseItemdetailsDao) All(where ...interface{}) ([]*model.BaseItemdetails, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model.BaseItemdetails
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.BaseItemdetails.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseItemdetailsDao) One(where ...interface{}) (*model.BaseItemdetails, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model.BaseItemdetails
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *BaseItemdetailsDao) FindOne(where ...interface{}) (*model.BaseItemdetails, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model.BaseItemdetails
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *BaseItemdetailsDao) FindAll(where ...interface{}) ([]*model.BaseItemdetails, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model.BaseItemdetails
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *BaseItemdetailsDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *BaseItemdetailsDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *BaseItemdetailsDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *BaseItemdetailsDao) Chunk(limit int, callback func(entities []*model.BaseItemdetails, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*model.BaseItemdetails
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *BaseItemdetailsDao) LockUpdate() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *BaseItemdetailsDao) LockShared() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *BaseItemdetailsDao) Unscoped() *BaseItemdetailsDao {
+	return &BaseItemdetailsDao{M: d.M.Unscoped()}
+}

+ 596 - 0
dao/internal/base_user.go

@@ -0,0 +1,596 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+	model2 "lims_adapter/model"
+	"time"
+)
+
+// BaseUserDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type BaseUserDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns baseUserColumns
+}
+
+// BaseUserColumns defines and stores column names for table base_user.
+type baseUserColumns struct {
+	Id                    string //
+	Uuid                  string // 用户Id标识,不易猜出
+	AccCode               string // 区分不同App的用户
+	Code                  string // 编码
+	UserName              string // 用户登录名
+	Realname              string // 用户名
+	RoleId                string // 角色id
+	SecurityLevel         string //
+	UserFrom              string //
+	CompanyId             string // 公司id
+	CompanyName           string // 公司名称
+	DepartmentId          string // 部门id
+	DepartmentName        string // 部门名称
+	WorkgroupId           string // 工作组id
+	WorkgroupName         string // 工作组名称
+	WorkCategory          string //
+	Duty                  string // 职务
+	Title                 string // 头衔
+	Gender                string // 性别
+	Birthday              string //
+	Mobile                string //
+	Telephone             string //
+	Email                 string //
+	OICQ                  string //
+	HomeAddress           string //
+	UserPassword          string //
+	ChangePasswordDate    string // 改密码时间
+	CommunicationPassword string //
+	PublicKey             string //
+	SignedPassword        string //
+	Lang                  string //
+	Theme                 string //
+	AllowStartTime        string //
+	AllowEndTime          string //
+	LockStartDate         string //
+	LockEndDate           string //
+	FirstVisit            string //
+	PreviousVisit         string //
+	LastVisit             string //
+	LogOnCount            string //
+	IsStaff               string //
+	UserOnLine            string //
+	IsVisible             string // 是否可视,1为可视
+	OpenId                string //
+	IPAddress             string //
+	MACAddress            string //
+	Question              string //
+	AnswerQuestion        string //
+	UserAddressId         string //
+	Enabled               string // 是否可用
+	AuditStatus           string // 激活状态(1激活)
+	DeletionStateCode     string // 删除状态
+	SortCode              string //
+	Description           string //
+	CreateOn              string //
+	CreateUserId          string //
+	CreateBy              string //
+	ModifiedOn            string //
+	ModifiedUserId        string //
+	ModifiedBy            string //
+	Photo                 string //
+	QRCode                string //
+	QRCodeImage           string //
+	IsCompanyUser         string // 是否是企业用户(供方字段用)
+	Superior              string // 上级部门
+	UnitId                string // 二级单位ID(供方字段用)
+	Unit                  string //
+	DeletedAt             string // 删除时间
+}
+
+var (
+	// BaseUser is globally public accessible object for table base_user operations.
+	BaseUser = BaseUserDao{
+		M:     g.DB("default").Model("base_user").Safe(),
+		DB:    g.DB("default"),
+		Table: "base_user",
+		Columns: baseUserColumns{
+			Id:                    "Id",
+			Uuid:                  "Uuid",
+			AccCode:               "AccCode",
+			Code:                  "Code",
+			UserName:              "UserName",
+			Realname:              "Realname",
+			RoleId:                "RoleId",
+			SecurityLevel:         "SecurityLevel",
+			UserFrom:              "UserFrom",
+			CompanyId:             "CompanyId",
+			CompanyName:           "CompanyName",
+			DepartmentId:          "DepartmentId",
+			DepartmentName:        "DepartmentName",
+			WorkgroupId:           "WorkgroupId",
+			WorkgroupName:         "WorkgroupName",
+			WorkCategory:          "WorkCategory",
+			Duty:                  "Duty",
+			Title:                 "Title",
+			Gender:                "Gender",
+			Birthday:              "Birthday",
+			Mobile:                "Mobile",
+			Telephone:             "Telephone",
+			Email:                 "Email",
+			OICQ:                  "OICQ",
+			HomeAddress:           "HomeAddress",
+			UserPassword:          "UserPassword",
+			ChangePasswordDate:    "ChangePasswordDate",
+			CommunicationPassword: "CommunicationPassword",
+			PublicKey:             "PublicKey",
+			SignedPassword:        "SignedPassword",
+			Lang:                  "Lang",
+			Theme:                 "Theme",
+			AllowStartTime:        "AllowStartTime",
+			AllowEndTime:          "AllowEndTime",
+			LockStartDate:         "LockStartDate",
+			LockEndDate:           "LockEndDate",
+			FirstVisit:            "FirstVisit",
+			PreviousVisit:         "PreviousVisit",
+			LastVisit:             "LastVisit",
+			LogOnCount:            "LogOnCount",
+			IsStaff:               "IsStaff",
+			UserOnLine:            "UserOnLine",
+			IsVisible:             "IsVisible",
+			OpenId:                "OpenId",
+			IPAddress:             "IPAddress",
+			MACAddress:            "MACAddress",
+			Question:              "Question",
+			AnswerQuestion:        "AnswerQuestion",
+			UserAddressId:         "UserAddressId",
+			Enabled:               "Enabled",
+			AuditStatus:           "AuditStatus",
+			DeletionStateCode:     "DeletionStateCode",
+			SortCode:              "SortCode",
+			Description:           "Description",
+			CreateOn:              "CreateOn",
+			CreateUserId:          "CreateUserId",
+			CreateBy:              "CreateBy",
+			ModifiedOn:            "ModifiedOn",
+			ModifiedUserId:        "ModifiedUserId",
+			ModifiedBy:            "ModifiedBy",
+			Photo:                 "Photo",
+			QRCode:                "QRCode",
+			QRCodeImage:           "QRCodeImage",
+			IsCompanyUser:         "IsCompanyUser",
+			Superior:              "Superior",
+			UnitId:                "UnitId",
+			Unit:                  "Unit",
+			DeletedAt:             "DeletedAt",
+		},
+	}
+)
+
+func NewBaseUserDao(tenant string) BaseUserDao {
+	var dao BaseUserDao
+	dao = BaseUserDao{
+		M:     g.DB(tenant).Model("base_user").Safe(),
+		DB:    g.DB(tenant),
+		Table: "base_user",
+		Columns: baseUserColumns{
+			Id:                    "Id",
+			Uuid:                  "Uuid",
+			AccCode:               "AccCode",
+			Code:                  "Code",
+			UserName:              "UserName",
+			Realname:              "Realname",
+			RoleId:                "RoleId",
+			SecurityLevel:         "SecurityLevel",
+			UserFrom:              "UserFrom",
+			CompanyId:             "CompanyId",
+			CompanyName:           "CompanyName",
+			DepartmentId:          "DepartmentId",
+			DepartmentName:        "DepartmentName",
+			WorkgroupId:           "WorkgroupId",
+			WorkgroupName:         "WorkgroupName",
+			WorkCategory:          "WorkCategory",
+			Duty:                  "Duty",
+			Title:                 "Title",
+			Gender:                "Gender",
+			Birthday:              "Birthday",
+			Mobile:                "Mobile",
+			Telephone:             "Telephone",
+			Email:                 "Email",
+			OICQ:                  "OICQ",
+			HomeAddress:           "HomeAddress",
+			UserPassword:          "UserPassword",
+			ChangePasswordDate:    "ChangePasswordDate",
+			CommunicationPassword: "CommunicationPassword",
+			PublicKey:             "PublicKey",
+			SignedPassword:        "SignedPassword",
+			Lang:                  "Lang",
+			Theme:                 "Theme",
+			AllowStartTime:        "AllowStartTime",
+			AllowEndTime:          "AllowEndTime",
+			LockStartDate:         "LockStartDate",
+			LockEndDate:           "LockEndDate",
+			FirstVisit:            "FirstVisit",
+			PreviousVisit:         "PreviousVisit",
+			LastVisit:             "LastVisit",
+			LogOnCount:            "LogOnCount",
+			IsStaff:               "IsStaff",
+			UserOnLine:            "UserOnLine",
+			IsVisible:             "IsVisible",
+			OpenId:                "OpenId",
+			IPAddress:             "IPAddress",
+			MACAddress:            "MACAddress",
+			Question:              "Question",
+			AnswerQuestion:        "AnswerQuestion",
+			UserAddressId:         "UserAddressId",
+			Enabled:               "Enabled",
+			AuditStatus:           "AuditStatus",
+			DeletionStateCode:     "DeletionStateCode",
+			SortCode:              "SortCode",
+			Description:           "Description",
+			CreateOn:              "CreateOn",
+			CreateUserId:          "CreateUserId",
+			CreateBy:              "CreateBy",
+			ModifiedOn:            "ModifiedOn",
+			ModifiedUserId:        "ModifiedUserId",
+			ModifiedBy:            "ModifiedBy",
+			Photo:                 "Photo",
+			QRCode:                "QRCode",
+			QRCodeImage:           "QRCodeImage",
+			IsCompanyUser:         "IsCompanyUser",
+			Superior:              "Superior",
+			UnitId:                "UnitId",
+			Unit:                  "Unit",
+			DeletedAt:             "DeletedAt",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *BaseUserDao) Ctx(ctx context.Context) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *BaseUserDao) As(as string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *BaseUserDao) TX(tx *gdb.TX) *BaseUserDao {
+	return &BaseUserDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *BaseUserDao) Master() *BaseUserDao {
+	return &BaseUserDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *BaseUserDao) Slave() *BaseUserDao {
+	return &BaseUserDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *BaseUserDao) Args(args ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseUserDao) LeftJoin(table ...string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseUserDao) RightJoin(table ...string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *BaseUserDao) InnerJoin(table ...string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseUserDao) Fields(fieldNamesOrMapStruct ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *BaseUserDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *BaseUserDao) Option(option int) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *BaseUserDao) OmitEmpty() *BaseUserDao {
+	return &BaseUserDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *BaseUserDao) Filter() *BaseUserDao {
+	return &BaseUserDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *BaseUserDao) Where(where interface{}, args ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *BaseUserDao) WherePri(where interface{}, args ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *BaseUserDao) And(where interface{}, args ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *BaseUserDao) Or(where interface{}, args ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *BaseUserDao) Group(groupBy string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *BaseUserDao) Order(orderBy ...string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *BaseUserDao) Limit(limit ...int) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *BaseUserDao) Offset(offset int) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *BaseUserDao) Page(page, limit int) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *BaseUserDao) Batch(batch int) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *BaseUserDao) Cache(duration time.Duration, name ...string) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *BaseUserDao) Data(data ...interface{}) *BaseUserDao {
+	return &BaseUserDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.BaseUser.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseUserDao) All(where ...interface{}) ([]*model2.BaseUser, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.BaseUser
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.BaseUser.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *BaseUserDao) One(where ...interface{}) (*model2.BaseUser, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.BaseUser
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *BaseUserDao) FindOne(where ...interface{}) (*model2.BaseUser, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.BaseUser
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *BaseUserDao) FindAll(where ...interface{}) ([]*model2.BaseUser, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.BaseUser
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *BaseUserDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *BaseUserDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *BaseUserDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *BaseUserDao) Chunk(limit int, callback func(entities []*model2.BaseUser, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*model2.BaseUser
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *BaseUserDao) LockUpdate() *BaseUserDao {
+	return &BaseUserDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *BaseUserDao) LockShared() *BaseUserDao {
+	return &BaseUserDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *BaseUserDao) Unscoped() *BaseUserDao {
+	return &BaseUserDao{M: d.M.Unscoped()}
+}

+ 524 - 0
dao/internal/instrument.go

@@ -0,0 +1,524 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"context"
+	"database/sql"
+	"github.com/gogf/gf/database/gdb"
+	"github.com/gogf/gf/frame/g"
+	"github.com/gogf/gf/frame/gmvc"
+	model2 "lims_adapter/model"
+	"time"
+)
+
+// InstrumentDao is the manager for logic model data accessing
+// and custom defined data operations functions management.
+type InstrumentDao struct {
+	gmvc.M
+	DB      gdb.DB
+	Table   string
+	Columns instrumentColumns
+}
+
+// InstrumentColumns defines and stores column names for table instrument.
+type instrumentColumns struct {
+	Id                      string //
+	RoomId                  string // 所属房间id
+	Code                    string // 设备编码
+	Name                    string // 设备名称
+	InstrImgId              string // 设备图片id
+	InstrImgUrl             string // 设备图片Url
+	SupplierId              string // 供应商
+	FactoryNum              string // 出厂编号
+	Model                   string // 型号
+	Brand                   string // 设备品牌
+	InstrType               string // 设备类别
+	Status                  string // 设备状态
+	Location                string // 设备所在位置
+	Remark                  string // 备注
+	IsFixedPoint            string // 参与点检:
+	CalibrationAt           string // 校准时间
+	CalibrationDeadline     string // 校准使用期限
+	CalibrationDeadlineType string // 期限类型
+	MaintenCycle            string // 维护周期数
+	CycleType               string // 期限类型
+	HeartbeatAt             string // 心跳时间
+	Spec                    string // 规格
+	CreatedAt               string // 创建时间
+	CreatedBy               string // 创建人
+	UpdatedAt               string // 更新时间
+	UpdatedBy               string // 更新人
+	TimeNotification        string // 有效期提醒
+	Sharable                string // 是否共享(可预约)
+	EndTime                 string // 截止日期
+	Responsible             string // 责任人
+	MaintenTime             string // 最后维护时间
+	PurchaseTime            string // 采购日期
+	JoinPlan                string // 计划
+	IsAppoint               string // 是否需要预约
+	DeletedAt               string // 删除时间
+	Weekday                 string // 每周可预约日
+	BeginAt                 string // 预约开始时段
+	EndAt                   string // 预约结束时间
+	MediaIds                string // 文件ID
+	IsOpen                  string // 是否开启预约  1开启 2未开启
+	Instructions            string // 使用说明
+	Terminal                string // 信息终端
+	RoleId                  string // 自动审批角色
+	Sort                    string // 排序
+}
+
+var (
+	// Instrument is globally public accessible object for table instrument operations.
+	Instrument = InstrumentDao{
+		M:     g.DB("default").Model("instrument").Safe(),
+		DB:    g.DB("default"),
+		Table: "instrument",
+		Columns: instrumentColumns{
+			Id:                      "Id",
+			RoomId:                  "RoomId",
+			Code:                    "Code",
+			Name:                    "Name",
+			InstrImgId:              "InstrImgId",
+			InstrImgUrl:             "InstrImgUrl",
+			SupplierId:              "SupplierId",
+			FactoryNum:              "FactoryNum",
+			Model:                   "Model",
+			Brand:                   "Brand",
+			InstrType:               "InstrType",
+			Status:                  "Status",
+			Location:                "Location",
+			Remark:                  "Remark",
+			IsFixedPoint:            "IsFixedPoint",
+			CalibrationAt:           "CalibrationAt",
+			CalibrationDeadline:     "CalibrationDeadline",
+			CalibrationDeadlineType: "CalibrationDeadlineType",
+			MaintenCycle:            "MaintenCycle",
+			CycleType:               "CycleType",
+			HeartbeatAt:             "HeartbeatAt",
+			Spec:                    "Spec",
+			CreatedAt:               "CreatedAt",
+			CreatedBy:               "CreatedBy",
+			UpdatedAt:               "UpdatedAt",
+			UpdatedBy:               "UpdatedBy",
+			TimeNotification:        "TimeNotification",
+			Sharable:                "Sharable",
+			EndTime:                 "EndTime",
+			Responsible:             "Responsible",
+			MaintenTime:             "MaintenTime",
+			PurchaseTime:            "PurchaseTime",
+			JoinPlan:                "JoinPlan",
+			IsAppoint:               "IsAppoint",
+			DeletedAt:               "DeletedAt",
+			Weekday:                 "Weekday",
+			BeginAt:                 "BeginAt",
+			EndAt:                   "EndAt",
+			MediaIds:                "MediaIds",
+			IsOpen:                  "IsOpen",
+			Instructions:            "Instructions",
+			Terminal:                "Terminal",
+			RoleId:                  "RoleId",
+			Sort:                    "Sort",
+		},
+	}
+)
+
+func NewInstrumentDao(tenant string) InstrumentDao {
+	var dao InstrumentDao
+	dao = InstrumentDao{
+		M:     g.DB(tenant).Model("instrument").Safe(),
+		DB:    g.DB(tenant),
+		Table: "instrument",
+		Columns: instrumentColumns{
+			Id:                      "Id",
+			RoomId:                  "RoomId",
+			Code:                    "Code",
+			Name:                    "Name",
+			InstrImgId:              "InstrImgId",
+			InstrImgUrl:             "InstrImgUrl",
+			SupplierId:              "SupplierId",
+			FactoryNum:              "FactoryNum",
+			Model:                   "Model",
+			Brand:                   "Brand",
+			InstrType:               "InstrType",
+			Status:                  "Status",
+			Location:                "Location",
+			Remark:                  "Remark",
+			IsFixedPoint:            "IsFixedPoint",
+			CalibrationAt:           "CalibrationAt",
+			CalibrationDeadline:     "CalibrationDeadline",
+			CalibrationDeadlineType: "CalibrationDeadlineType",
+			MaintenCycle:            "MaintenCycle",
+			CycleType:               "CycleType",
+			HeartbeatAt:             "HeartbeatAt",
+			Spec:                    "Spec",
+			CreatedAt:               "CreatedAt",
+			CreatedBy:               "CreatedBy",
+			UpdatedAt:               "UpdatedAt",
+			UpdatedBy:               "UpdatedBy",
+			TimeNotification:        "TimeNotification",
+			Sharable:                "Sharable",
+			EndTime:                 "EndTime",
+			Responsible:             "Responsible",
+			MaintenTime:             "MaintenTime",
+			PurchaseTime:            "PurchaseTime",
+			JoinPlan:                "JoinPlan",
+			IsAppoint:               "IsAppoint",
+			DeletedAt:               "DeletedAt",
+			Weekday:                 "Weekday",
+			BeginAt:                 "BeginAt",
+			EndAt:                   "EndAt",
+			MediaIds:                "MediaIds",
+			IsOpen:                  "IsOpen",
+			Instructions:            "Instructions",
+			Terminal:                "Terminal",
+			RoleId:                  "RoleId",
+			Sort:                    "Sort",
+		},
+	}
+	return dao
+}
+
+// Ctx is a chaining function, which creates and returns a new DB that is a shallow copy
+// of current DB object and with given context in it.
+// Note that this returned DB object can be used only once, so do not assign it to
+// a global or package variable for long using.
+func (d *InstrumentDao) Ctx(ctx context.Context) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Ctx(ctx)}
+}
+
+// As sets an alias name for current table.
+func (d *InstrumentDao) As(as string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.As(as)}
+}
+
+// TX sets the transaction for current operation.
+func (d *InstrumentDao) TX(tx *gdb.TX) *InstrumentDao {
+	return &InstrumentDao{M: d.M.TX(tx)}
+}
+
+// Master marks the following operation on master node.
+func (d *InstrumentDao) Master() *InstrumentDao {
+	return &InstrumentDao{M: d.M.Master()}
+}
+
+// Slave marks the following operation on slave node.
+// Note that it makes sense only if there's any slave node configured.
+func (d *InstrumentDao) Slave() *InstrumentDao {
+	return &InstrumentDao{M: d.M.Slave()}
+}
+
+// Args sets custom arguments for model operation.
+func (d *InstrumentDao) Args(args ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Args(args...)}
+}
+
+// LeftJoin does "LEFT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").LeftJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").LeftJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *InstrumentDao) LeftJoin(table ...string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.LeftJoin(table...)}
+}
+
+// RightJoin does "RIGHT JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").RightJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").RightJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *InstrumentDao) RightJoin(table ...string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.RightJoin(table...)}
+}
+
+// InnerJoin does "INNER JOIN ... ON ..." statement on the model.
+// The parameter <table> can be joined table and its joined condition,
+// and also with its alias name, like:
+// Table("user").InnerJoin("user_detail", "user_detail.uid=user.uid")
+// Table("user", "u").InnerJoin("user_detail", "ud", "ud.uid=u.uid")
+func (d *InstrumentDao) InnerJoin(table ...string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.InnerJoin(table...)}
+}
+
+// Fields sets the operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *InstrumentDao) Fields(fieldNamesOrMapStruct ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Fields(fieldNamesOrMapStruct...)}
+}
+
+// FieldsEx sets the excluded operation fields of the model, multiple fields joined using char ','.
+// The parameter <fieldNamesOrMapStruct> can be type of string/map/*map/struct/*struct.
+func (d *InstrumentDao) FieldsEx(fieldNamesOrMapStruct ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.FieldsEx(fieldNamesOrMapStruct...)}
+}
+
+// Option sets the extra operation option for the model.
+func (d *InstrumentDao) Option(option int) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Option(option)}
+}
+
+// OmitEmpty sets OPTION_OMITEMPTY option for the model, which automatically filers
+// the data and where attributes for empty values.
+func (d *InstrumentDao) OmitEmpty() *InstrumentDao {
+	return &InstrumentDao{M: d.M.OmitEmpty()}
+}
+
+// Filter marks filtering the fields which does not exist in the fields of the operated table.
+func (d *InstrumentDao) Filter() *InstrumentDao {
+	return &InstrumentDao{M: d.M.Filter()}
+}
+
+// Where sets the condition statement for the model. The parameter <where> can be type of
+// string/map/gmap/slice/struct/*struct, etc. Note that, if it's called more than one times,
+// multiple conditions will be joined into where statement using "AND".
+// Eg:
+// Where("uid=10000")
+// Where("uid", 10000)
+// Where("money>? AND name like ?", 99999, "vip_%")
+// Where("uid", 1).Where("name", "john")
+// Where("status IN (?)", g.Slice{1,2,3})
+// Where("age IN(?,?)", 18, 50)
+// Where(User{ Id : 1, UserName : "john"})
+func (d *InstrumentDao) Where(where interface{}, args ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Where(where, args...)}
+}
+
+// WherePri does the same logic as M.Where except that if the parameter <where>
+// is a single condition like int/string/float/slice, it treats the condition as the primary
+// key value. That is, if primary key is "id" and given <where> parameter as "123", the
+// WherePri function treats the condition as "id=123", but M.Where treats the condition
+// as string "123".
+func (d *InstrumentDao) WherePri(where interface{}, args ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.WherePri(where, args...)}
+}
+
+// And adds "AND" condition to the where statement.
+func (d *InstrumentDao) And(where interface{}, args ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.And(where, args...)}
+}
+
+// Or adds "OR" condition to the where statement.
+func (d *InstrumentDao) Or(where interface{}, args ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Or(where, args...)}
+}
+
+// Group sets the "GROUP BY" statement for the model.
+func (d *InstrumentDao) Group(groupBy string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Group(groupBy)}
+}
+
+// Order sets the "ORDER BY" statement for the model.
+func (d *InstrumentDao) Order(orderBy ...string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Order(orderBy...)}
+}
+
+// Limit sets the "LIMIT" statement for the model.
+// The parameter <limit> can be either one or two number, if passed two number is passed,
+// it then sets "LIMIT limit[0],limit[1]" statement for the model, or else it sets "LIMIT limit[0]"
+// statement.
+func (d *InstrumentDao) Limit(limit ...int) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Limit(limit...)}
+}
+
+// Offset sets the "OFFSET" statement for the model.
+// It only makes sense for some databases like SQLServer, PostgreSQL, etc.
+func (d *InstrumentDao) Offset(offset int) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Offset(offset)}
+}
+
+// Page sets the paging number for the model.
+// The parameter <page> is started from 1 for paging.
+// Note that, it differs that the Limit function start from 0 for "LIMIT" statement.
+func (d *InstrumentDao) Page(page, limit int) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Page(page, limit)}
+}
+
+// Batch sets the batch operation number for the model.
+func (d *InstrumentDao) Batch(batch int) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Batch(batch)}
+}
+
+// Cache sets the cache feature for the model. It caches the result of the sql, which means
+// if there's another same sql request, it just reads and returns the result from cache, it
+// but not committed and executed into the database.
+//
+// If the parameter <duration> < 0, which means it clear the cache with given <name>.
+// If the parameter <duration> = 0, which means it never expires.
+// If the parameter <duration> > 0, which means it expires after <duration>.
+//
+// The optional parameter <name> is used to bind a name to the cache, which means you can later
+// control the cache like changing the <duration> or clearing the cache with specified <name>.
+//
+// Note that, the cache feature is disabled if the model is operating on a transaction.
+func (d *InstrumentDao) Cache(duration time.Duration, name ...string) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Cache(duration, name...)}
+}
+
+// Data sets the operation data for the model.
+// The parameter <data> can be type of string/map/gmap/slice/struct/*struct, etc.
+// Eg:
+// Data("uid=10000")
+// Data("uid", 10000)
+// Data(g.Map{"uid": 10000, "name":"john"})
+// Data(g.Slice{g.Map{"uid": 10000, "name":"john"}, g.Map{"uid": 20000, "name":"smith"})
+func (d *InstrumentDao) Data(data ...interface{}) *InstrumentDao {
+	return &InstrumentDao{M: d.M.Data(data...)}
+}
+
+// All does "SELECT FROM ..." statement for the model.
+// It retrieves the records from table and returns the result as []*model.Instrument.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *InstrumentDao) All(where ...interface{}) ([]*model2.Instrument, error) {
+	all, err := d.M.All(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.Instrument
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// One retrieves one record from table and returns the result as *model.Instrument.
+// It returns nil if there's no record retrieved with the given conditions from table.
+//
+// The optional parameter <where> is the same as the parameter of M.Where function,
+// see M.Where.
+func (d *InstrumentDao) One(where ...interface{}) (*model2.Instrument, error) {
+	one, err := d.M.One(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.Instrument
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindOne retrieves and returns a single Record by M.WherePri and M.One.
+// Also see M.WherePri and M.One.
+func (d *InstrumentDao) FindOne(where ...interface{}) (*model2.Instrument, error) {
+	one, err := d.M.FindOne(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entity *model2.Instrument
+	if err = one.Struct(&entity); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entity, nil
+}
+
+// FindAll retrieves and returns Result by by M.WherePri and M.All.
+// Also see M.WherePri and M.All.
+func (d *InstrumentDao) FindAll(where ...interface{}) ([]*model2.Instrument, error) {
+	all, err := d.M.FindAll(where...)
+	if err != nil {
+		return nil, err
+	}
+	var entities []*model2.Instrument
+	if err = all.Structs(&entities); err != nil && err != sql.ErrNoRows {
+		return nil, err
+	}
+	return entities, nil
+}
+
+// Struct retrieves one record from table and converts it into given struct.
+// The parameter <pointer> should be type of *struct/**struct. If type **struct is given,
+// it can create the struct internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not nil.
+//
+// Eg:
+// user := new(User)
+// err  := dao.User.Where("id", 1).Struct(user)
+//
+// user := (*User)(nil)
+// err  := dao.User.Where("id", 1).Struct(&user)
+func (d *InstrumentDao) Struct(pointer interface{}, where ...interface{}) error {
+	return d.M.Struct(pointer, where...)
+}
+
+// Structs retrieves records from table and converts them into given struct slice.
+// The parameter <pointer> should be type of *[]struct/*[]*struct. It can create and fill the struct
+// slice internally during converting.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved with the given conditions
+// from table and <pointer> is not empty.
+//
+// Eg:
+// users := ([]User)(nil)
+// err   := dao.User.Structs(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Structs(&users)
+func (d *InstrumentDao) Structs(pointer interface{}, where ...interface{}) error {
+	return d.M.Structs(pointer, where...)
+}
+
+// Scan automatically calls Struct or Structs function according to the type of parameter <pointer>.
+// It calls function Struct if <pointer> is type of *struct/**struct.
+// It calls function Structs if <pointer> is type of *[]struct/*[]*struct.
+//
+// The optional parameter <where> is the same as the parameter of Model.Where function,
+// see Model.Where.
+//
+// Note that it returns sql.ErrNoRows if there's no record retrieved and given pointer is not empty or nil.
+//
+// Eg:
+// user  := new(User)
+// err   := dao.User.Where("id", 1).Scan(user)
+//
+// user  := (*User)(nil)
+// err   := dao.User.Where("id", 1).Scan(&user)
+//
+// users := ([]User)(nil)
+// err   := dao.User.Scan(&users)
+//
+// users := ([]*User)(nil)
+// err   := dao.User.Scan(&users)
+func (d *InstrumentDao) Scan(pointer interface{}, where ...interface{}) error {
+	return d.M.Scan(pointer, where...)
+}
+
+// Chunk iterates the table with given size and callback function.
+func (d *InstrumentDao) Chunk(limit int, callback func(entities []*model2.Instrument, err error) bool) {
+	d.M.Chunk(limit, func(result gdb.Result, err error) bool {
+		var entities []*model2.Instrument
+		err = result.Structs(&entities)
+		if err == sql.ErrNoRows {
+			return false
+		}
+		return callback(entities, err)
+	})
+}
+
+// LockUpdate sets the lock for update for current operation.
+func (d *InstrumentDao) LockUpdate() *InstrumentDao {
+	return &InstrumentDao{M: d.M.LockUpdate()}
+}
+
+// LockShared sets the lock in share mode for current operation.
+func (d *InstrumentDao) LockShared() *InstrumentDao {
+	return &InstrumentDao{M: d.M.LockShared()}
+}
+
+// Unscoped enables/disables the soft deleting feature.
+func (d *InstrumentDao) Unscoped() *InstrumentDao {
+	return &InstrumentDao{M: d.M.Unscoped()}
+}

+ 40 - 0
model/base_equipment_advance_time.go

@@ -0,0 +1,40 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. Fill this file as you wish.
+// ==========================================================================
+
+package model
+
+import (
+	internal2 "lims_adapter/model/internal"
+)
+
+// BaseEquipmentAdvanceTime is the golang structure for table base_equipment_advance_time.
+type BaseEquipmentAdvanceTime internal2.BaseEquipmentAdvanceTime
+
+// Fill with you ideas below.
+
+// 添加优先预约时间段
+type AdvanceTimeReq struct {
+	EquipmentId int    `json:"equipment_id"`
+	Week        string `json:"week"`
+	StartTime   string `json:"startTime"`
+	EndTime     string `json:"endTime"`
+}
+
+type TimeForm struct {
+	Domains []Domain `json:"domains"`
+}
+
+type Domain struct {
+	Week      string `json:"week"`
+	StartTime string `json:"startTime"`
+	EndTime   string `json:"endTime"`
+}
+
+// 不能预约时间段信息
+type NoReservationInfo struct {
+	Day       int    `json:"day"`
+	Week      int    `json:"week"`
+	StartTime string `json:"start_time"`
+	Status    int    `json:"status"`
+}

+ 21 - 0
model/base_itemdetails.go

@@ -0,0 +1,21 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. Fill this file as you wish.
+// ==========================================================================
+
+package model
+
+import (
+	"lims_adapter/model/internal"
+)
+
+// BaseItemdetails is the golang structure for table base_itemdetails.
+type BaseItemdetails internal.BaseItemdetails
+
+// Fill with you ideas below.
+
+type DictReq struct {
+	DictCode  string `json:"dict_code"`
+	ItemName  string `json:"item_name"`
+	ItemValue string `json:"item_value"`
+	SortCode  string `json:"sort_code"`
+}

+ 37 - 0
model/base_user.go

@@ -0,0 +1,37 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. Fill this file as you wish.
+// ==========================================================================
+
+package model
+
+import (
+	"github.com/gogf/gf/os/gtime"
+	"lims_adapter/model/internal"
+)
+
+// BaseUser is the golang structure for table base_user.
+type BaseUser internal.BaseUser
+
+// Fill with you ideas below.
+
+type UserQualification struct {
+	Id            int         `orm:"Id,primary"            json:"id"`           //
+	UserName      string      `orm:"UserName"              json:"userName"`     // 用户登录名
+	RealName      string      `orm:"RealName"              json:"realName"`     // 用户名
+	Qualification int         `orm:"Qualification"		   json:"qualification"`    // 资格 1普通资格 2资深资格
+	Mobile        string      `orm:"Mobile"                json:"mobile"`       // 手机号
+	AuthorizeTime *gtime.Time `orm:"AuthorizeTime"    	   json:"authorizeTime"` // 授权时间
+}
+
+type UserInfoReq struct {
+	PageNun      int `json:"pageNum"`
+	PageSize     int `json:"pageSize"`
+	Enabled      int `json:"enabled"`
+	InstrumentId int `json:"instrument_id"`
+	DepartmentId int `json:"department_id"`
+	ReqType      int `json:"req_type"` // 请求类型 1:预约资格 2:优先预约权
+}
+type UserInfoRsp struct {
+	Records []BaseUser `json:"records"`
+	Total   int        `json:"total"'`
+}

+ 14 - 0
model/instrument.go

@@ -0,0 +1,14 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. Fill this file as you wish.
+// ==========================================================================
+
+package model
+
+import (
+	"lims_adapter/model/internal"
+)
+
+// Instrument is the golang structure for table instrument.
+type Instrument internal.Instrument
+
+// Fill with you ideas below.

+ 21 - 0
model/internal/base_equipment_advance_time.go

@@ -0,0 +1,21 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+// BaseEquipmentAdvanceTime is the golang structure for table base_equipment_advance_time.
+type BaseEquipmentAdvanceTime struct {
+	Id           int         `orm:"Id,primary"   json:"id"`           // 主键
+	EquipmentId  int         `orm:"EquipmentId"  json:"equipmentId"`  // 设备Id
+	Week         int         `orm:"Week"         json:"week"`         // 星期 1-7为周一到周日
+	StartTime    string      `orm:"StartTime"    json:"startTime"`    // 开始时间 XX:XX
+	EndTime      string      `orm:"EndTime"      json:"endTime"`      // 结束时间 XX:XX
+	CreateUserId int         `orm:"CreateUserId" json:"createUserId"` //
+	CreateBy     string      `orm:"CreateBy"     json:"createBy"`     //
+	CreateOn     *gtime.Time `orm:"CreateOn"     json:"createOn"`     //
+}

+ 31 - 0
model/internal/base_itemdetails.go

@@ -0,0 +1,31 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+// BaseItemdetails is the golang structure for table base_itemdetails.
+type BaseItemdetails struct {
+	Id             int         `orm:"Id,primary"     json:"id"`             //
+	DictCode       string      `orm:"DictCode"       json:"dictCode"`       // 字典类型
+	ParentId       int         `orm:"ParentId"       json:"parentId"`       //
+	ItemCode       string      `orm:"ItemCode"       json:"itemCode"`       //
+	ItemName       string      `orm:"ItemName"       json:"itemName"`       //
+	ItemValue      string      `orm:"ItemValue"      json:"itemValue"`      //
+	IsDefault      string      `orm:"IsDefault"      json:"isDefault"`      // 是否默认(1是 0否)
+	Enabled        int         `orm:"Enabled"        json:"enabled"`        // 状态(1正常 0停用
+	AllowEdit      int         `orm:"AllowEdit"      json:"allowEdit"`      //
+	AllowDelete    int         `orm:"AllowDelete"    json:"allowDelete"`    //
+	SortCode       int         `orm:"SortCode"       json:"sortCode"`       //
+	Description    string      `orm:"Description"    json:"description"`    //
+	CreateOn       *gtime.Time `orm:"CreateOn"       json:"createOn"`       //
+	CreateUserId   string      `orm:"CreateUserId"   json:"createUserId"`   //
+	CreateBy       string      `orm:"CreateBy"       json:"createBy"`       //
+	ModifiedOn     *gtime.Time `orm:"ModifiedOn"     json:"modifiedOn"`     //
+	ModifiedUserId string      `orm:"ModifiedUserId" json:"modifiedUserId"` //
+	ModifiedBy     string      `orm:"ModifiedBy"     json:"modifiedBy"`     //
+}

+ 81 - 0
model/internal/base_user.go

@@ -0,0 +1,81 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+// BaseUser is the golang structure for table base_user.
+type BaseUser struct {
+	Id                    int         `orm:"Id,primary"            json:"id"`                    //
+	Uuid                  string      `orm:"Uuid"                  json:"uuid"`                  // 用户Id标识,不易猜出
+	AccCode               string      `orm:"AccCode"               json:"accCode"`               // 区分不同App的用户
+	Code                  string      `orm:"Code"                  json:"code"`                  // 编码
+	UserName              string      `orm:"UserName"              json:"userName"`              // 用户登录名
+	Realname              string      `orm:"Realname"              json:"realname"`              // 用户名
+	RoleId                int         `orm:"RoleId"                json:"roleId"`                // 角色id
+	SecurityLevel         int         `orm:"SecurityLevel"         json:"securityLevel"`         //
+	UserFrom              string      `orm:"UserFrom"              json:"userFrom"`              //
+	CompanyId             string      `orm:"CompanyId"             json:"companyId"`             // 公司id
+	CompanyName           string      `orm:"CompanyName"           json:"companyName"`           // 公司名称
+	DepartmentId          string      `orm:"DepartmentId"          json:"departmentId"`          // 部门id
+	DepartmentName        string      `orm:"DepartmentName"        json:"departmentName"`        // 部门名称
+	WorkgroupId           string      `orm:"WorkgroupId"           json:"workgroupId"`           // 工作组id
+	WorkgroupName         string      `orm:"WorkgroupName"         json:"workgroupName"`         // 工作组名称
+	WorkCategory          string      `orm:"WorkCategory"          json:"workCategory"`          //
+	Duty                  string      `orm:"Duty"                  json:"duty"`                  // 职务
+	Title                 string      `orm:"Title"                 json:"title"`                 // 头衔
+	Gender                string      `orm:"Gender"                json:"gender"`                // 性别
+	Birthday              string      `orm:"Birthday"              json:"birthday"`              //
+	Mobile                string      `orm:"Mobile"                json:"mobile"`                //
+	Telephone             string      `orm:"Telephone"             json:"telephone"`             //
+	Email                 string      `orm:"Email"                 json:"email"`                 //
+	OICQ                  string      `orm:"OICQ"                  json:"oICQ"`                  //
+	HomeAddress           string      `orm:"HomeAddress"           json:"homeAddress"`           //
+	UserPassword          string      `orm:"UserPassword"          json:"userPassword"`          //
+	ChangePasswordDate    *gtime.Time `orm:"ChangePasswordDate"    json:"changePasswordDate"`    // 改密码时间
+	CommunicationPassword string      `orm:"CommunicationPassword" json:"communicationPassword"` //
+	PublicKey             string      `orm:"PublicKey"             json:"publicKey"`             //
+	SignedPassword        string      `orm:"SignedPassword"        json:"signedPassword"`        //
+	Lang                  string      `orm:"Lang"                  json:"lang"`                  //
+	Theme                 string      `orm:"Theme"                 json:"theme"`                 //
+	AllowStartTime        *gtime.Time `orm:"AllowStartTime"        json:"allowStartTime"`        //
+	AllowEndTime          *gtime.Time `orm:"AllowEndTime"          json:"allowEndTime"`          //
+	LockStartDate         *gtime.Time `orm:"LockStartDate"         json:"lockStartDate"`         //
+	LockEndDate           *gtime.Time `orm:"LockEndDate"           json:"lockEndDate"`           //
+	FirstVisit            *gtime.Time `orm:"FirstVisit"            json:"firstVisit"`            //
+	PreviousVisit         *gtime.Time `orm:"PreviousVisit"         json:"previousVisit"`         //
+	LastVisit             *gtime.Time `orm:"LastVisit"             json:"lastVisit"`             //
+	LogOnCount            int         `orm:"LogOnCount"            json:"logOnCount"`            //
+	IsStaff               int         `orm:"IsStaff"               json:"isStaff"`               //
+	UserOnLine            int         `orm:"UserOnLine"            json:"userOnLine"`            //
+	IsVisible             int         `orm:"IsVisible"             json:"isVisible"`             // 是否可视,1为可视
+	OpenId                string      `orm:"OpenId"                json:"openId"`                //
+	IPAddress             string      `orm:"IPAddress"             json:"iPAddress"`             //
+	MACAddress            string      `orm:"MACAddress"            json:"mACAddress"`            //
+	Question              string      `orm:"Question"              json:"question"`              //
+	AnswerQuestion        string      `orm:"AnswerQuestion"        json:"answerQuestion"`        //
+	UserAddressId         int         `orm:"UserAddressId"         json:"userAddressId"`         //
+	Enabled               int         `orm:"Enabled"               json:"enabled"`               // 是否可用
+	AuditStatus           int         `orm:"AuditStatus"           json:"auditStatus"`           // 激活状态(1激活)
+	DeletionStateCode     int         `orm:"DeletionStateCode"     json:"deletionStateCode"`     // 删除状态
+	SortCode              int         `orm:"SortCode"              json:"sortCode"`              //
+	Description           string      `orm:"Description"           json:"description"`           //
+	CreateOn              *gtime.Time `orm:"CreateOn"              json:"createOn"`              //
+	CreateUserId          string      `orm:"CreateUserId"          json:"createUserId"`          //
+	CreateBy              string      `orm:"CreateBy"              json:"createBy"`              //
+	ModifiedOn            *gtime.Time `orm:"ModifiedOn"            json:"modifiedOn"`            //
+	ModifiedUserId        string      `orm:"ModifiedUserId"        json:"modifiedUserId"`        //
+	ModifiedBy            string      `orm:"ModifiedBy"            json:"modifiedBy"`            //
+	Photo                 string      `orm:"Photo"                 json:"photo"`                 //
+	QRCode                string      `orm:"QRCode"                json:"qRCode"`                //
+	QRCodeImage           []byte      `orm:"QRCodeImage"           json:"qRCodeImage"`           //
+	IsCompanyUser         int         `orm:"IsCompanyUser"         json:"isCompanyUser"`         // 是否是企业用户(供方字段用)
+	Superior              string      `orm:"Superior"              json:"superior"`              // 上级部门
+	UnitId                int         `orm:"UnitId"                json:"unitId"`                // 二级单位ID(供方字段用)
+	Unit                  string      `orm:"Unit"                  json:"unit"`                  //
+	DeletedAt             *gtime.Time `orm:"DeletedAt"             json:"deletedAt"`             // 删除时间
+}

+ 57 - 0
model/internal/instrument.go

@@ -0,0 +1,57 @@
+// ==========================================================================
+// This is auto-generated by gf cli tool. DO NOT EDIT THIS FILE MANUALLY.
+// ==========================================================================
+
+package internal
+
+import (
+	"github.com/gogf/gf/os/gtime"
+)
+
+// Instrument is the golang structure for table instrument.
+type Instrument struct {
+	Id                      int         `orm:"Id,primary"              json:"id"`                      //
+	RoomId                  int         `orm:"RoomId"                  json:"roomId"`                  // 所属房间id
+	Code                    string      `orm:"Code"                    json:"code"`                    // 设备编码
+	Name                    string      `orm:"Name"                    json:"name"`                    // 设备名称
+	InstrImgId              int         `orm:"InstrImgId"              json:"instrImgId"`              // 设备图片id
+	InstrImgUrl             string      `orm:"InstrImgUrl"             json:"instrImgUrl"`             // 设备图片Url
+	SupplierId              int         `orm:"SupplierId"              json:"supplierId"`              // 供应商
+	FactoryNum              string      `orm:"FactoryNum"              json:"factoryNum"`              // 出厂编号
+	Model                   string      `orm:"Model"                   json:"model"`                   // 型号
+	Brand                   string      `orm:"Brand"                   json:"brand"`                   // 设备品牌
+	InstrType               int         `orm:"InstrType"               json:"instrType"`               // 设备类别
+	Status                  int         `orm:"Status"                  json:"status"`                  // 设备状态
+	Location                string      `orm:"Location"                json:"location"`                // 设备所在位置
+	Remark                  string      `orm:"Remark"                  json:"remark"`                  // 备注
+	IsFixedPoint            int         `orm:"IsFixedPoint"            json:"isFixedPoint"`            // 参与点检:
+	CalibrationAt           string      `orm:"CalibrationAt"           json:"calibrationAt"`           // 校准时间
+	CalibrationDeadline     int         `orm:"CalibrationDeadline"     json:"calibrationDeadline"`     // 校准使用期限
+	CalibrationDeadlineType int         `orm:"CalibrationDeadlineType" json:"calibrationDeadlineType"` // 期限类型
+	MaintenCycle            int         `orm:"MaintenCycle"            json:"maintenCycle"`            // 维护周期数
+	CycleType               int         `orm:"CycleType"               json:"cycleType"`               // 期限类型
+	HeartbeatAt             *gtime.Time `orm:"HeartbeatAt"             json:"heartbeatAt"`             // 心跳时间
+	Spec                    string      `orm:"Spec"                    json:"spec"`                    // 规格
+	CreatedAt               string      `orm:"CreatedAt"               json:"createdAt"`               // 创建时间
+	CreatedBy               int         `orm:"CreatedBy"               json:"createdBy"`               // 创建人
+	UpdatedAt               *gtime.Time `orm:"UpdatedAt"               json:"updatedAt"`               // 更新时间
+	UpdatedBy               int         `orm:"UpdatedBy"               json:"updatedBy"`               // 更新人
+	TimeNotification        int         `orm:"TimeNotification"        json:"timeNotification"`        // 有效期提醒
+	Sharable                int         `orm:"Sharable"                json:"sharable"`                // 是否共享(可预约)
+	EndTime                 *gtime.Time `orm:"EndTime"                 json:"endTime"`                 // 截止日期
+	Responsible             string      `orm:"Responsible"             json:"responsible"`             // 责任人
+	MaintenTime             *gtime.Time `orm:"MaintenTime"             json:"maintenTime"`             // 最后维护时间
+	PurchaseTime            *gtime.Time `orm:"PurchaseTime"            json:"purchaseTime"`            // 采购日期
+	JoinPlan                int         `orm:"JoinPlan"                json:"joinPlan"`                // 计划
+	IsAppoint               int         `orm:"IsAppoint"               json:"isAppoint"`               // 是否需要预约
+	DeletedAt               *gtime.Time `orm:"DeletedAt"               json:"deletedAt"`               // 删除时间
+	Weekday                 string      `orm:"Weekday"                 json:"weekday"`                 // 每周可预约日
+	BeginAt                 *gtime.Time `orm:"BeginAt"                 json:"beginAt"`                 // 预约开始时段
+	EndAt                   *gtime.Time `orm:"EndAt"                   json:"endAt"`                   // 预约结束时间
+	MediaIds                string      `orm:"MediaIds"                json:"mediaIds"`                // 文件ID
+	IsOpen                  int         `orm:"IsOpen"                  json:"isOpen"`                  // 是否开启预约  1开启 2未开启
+	Instructions            string      `orm:"Instructions"            json:"instructions"`            // 使用说明
+	Terminal                string      `orm:"Terminal"                json:"terminal"`                // 信息终端
+	RoleId                  int         `orm:"RoleId"                  json:"roleId"`                  // 自动审批角色
+	Sort                    int         `orm:"Sort"                    json:"sort"`                    // 排序
+}

+ 1 - 1
test/meeting.http

@@ -88,7 +88,7 @@ Authorization: Bearer ajg7o1Dts1JrKCm6VtgyuuaYbUIiirXxI5+6WzYnC7gWl+43NdKq6LbWxU
 ###
 
 ### 查看短列表
-POST http://192.168.0.63:9981/dashoo.lims.adapter-0.1-guodj
+POST http://192.168.0.37:9981/dashoo.lims.adapter-0.1-jlw
 Content-Type: application/json
 X-RPCX-SerializeType: 1
 X-RPCX-ServicePath: Meeting