feat&refactor: 完成多模块功能迭代与配置优化
本次提交覆盖多个业务模块的功能完善与体验优化:
1. **鉴权与配置调整**:
- 统一JWT滑动续签逻辑,简化Token存储,移除RefreshToken相关冗余代码
- 调整多项目配置文件中JWT过期时间为3600秒,统一会话闲置窗口
- 工位配置放开1~12限制,改为仅校验大于0
2. **术语统一替换**:全链路将"精密件"替换为"电气件",修正物料管理描述
3. **功能新增**:
- 新增工位类型、工艺路线与产线点位台账模块
- 添加工艺PDF预览面板、工位终端代理转发接口
- 新增操作日志按操作人列表筛选、工位登出日志记录
- 新增PLC移料指令与产线点位状态管理
4. **业务流程优化**:
- 调整BOM物料删除校验逻辑,优化工单备料计算
- 补充物料图号、检测单号等追溯字段
- 完善工艺流程图与工位绑定关系说明
- 优化前端页面文案与交互细节
5. **代码规范与维护**:
- 新增通用工具函数与前端静态资源
- 整理路由权限与中间件逻辑
- 修复部分接口与配置的不兼容问题
This commit is contained in:
+197
-25
@@ -8,13 +8,17 @@ import (
|
||||
"bj_power_mes/ent/dailyplan"
|
||||
"bj_power_mes/ent/eventlog"
|
||||
"bj_power_mes/ent/inspectionrecord"
|
||||
"bj_power_mes/ent/linepoint"
|
||||
"bj_power_mes/ent/materialrequest"
|
||||
"bj_power_mes/ent/permission"
|
||||
"bj_power_mes/ent/plcmovecmd"
|
||||
"bj_power_mes/ent/plcsendlog"
|
||||
"bj_power_mes/ent/processflow"
|
||||
"bj_power_mes/ent/processroute"
|
||||
"bj_power_mes/ent/processstep"
|
||||
"bj_power_mes/ent/producttype"
|
||||
"bj_power_mes/ent/role"
|
||||
"bj_power_mes/ent/routesegment"
|
||||
"bj_power_mes/ent/scanrecord"
|
||||
"bj_power_mes/ent/semiflow"
|
||||
"bj_power_mes/ent/station"
|
||||
@@ -282,6 +286,56 @@ func init() {
|
||||
inspectionrecordDescID := inspectionrecordFields[0].Descriptor()
|
||||
// inspectionrecord.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
inspectionrecord.IDValidator = inspectionrecordDescID.Validators[0].(func(int) error)
|
||||
linepointFields := schema.LinePoint{}.Fields()
|
||||
_ = linepointFields
|
||||
// linepointDescPointType is the schema descriptor for pointType field.
|
||||
linepointDescPointType := linepointFields[1].Descriptor()
|
||||
// linepoint.PointTypeValidator is a validator for the "pointType" field. It is called by the builders before save.
|
||||
linepoint.PointTypeValidator = linepointDescPointType.Validators[0].(func(string) error)
|
||||
// linepointDescPointNo is the schema descriptor for pointNo field.
|
||||
linepointDescPointNo := linepointFields[2].Descriptor()
|
||||
// linepoint.PointNoValidator is a validator for the "pointNo" field. It is called by the builders before save.
|
||||
linepoint.PointNoValidator = linepointDescPointNo.Validators[0].(func(string) error)
|
||||
// linepointDescLabel is the schema descriptor for label field.
|
||||
linepointDescLabel := linepointFields[3].Descriptor()
|
||||
// linepoint.DefaultLabel holds the default value on creation for the label field.
|
||||
linepoint.DefaultLabel = linepointDescLabel.Default.(string)
|
||||
// linepoint.LabelValidator is a validator for the "label" field. It is called by the builders before save.
|
||||
linepoint.LabelValidator = linepointDescLabel.Validators[0].(func(string) error)
|
||||
// linepointDescSeq is the schema descriptor for seq field.
|
||||
linepointDescSeq := linepointFields[4].Descriptor()
|
||||
// linepoint.DefaultSeq holds the default value on creation for the seq field.
|
||||
linepoint.DefaultSeq = linepointDescSeq.Default.(int)
|
||||
// linepointDescStationNo is the schema descriptor for stationNo field.
|
||||
linepointDescStationNo := linepointFields[5].Descriptor()
|
||||
// linepoint.DefaultStationNo holds the default value on creation for the stationNo field.
|
||||
linepoint.DefaultStationNo = linepointDescStationNo.Default.(int)
|
||||
// linepointDescCurrentSn is the schema descriptor for currentSn field.
|
||||
linepointDescCurrentSn := linepointFields[6].Descriptor()
|
||||
// linepoint.DefaultCurrentSn holds the default value on creation for the currentSn field.
|
||||
linepoint.DefaultCurrentSn = linepointDescCurrentSn.Default.(string)
|
||||
// linepoint.CurrentSnValidator is a validator for the "currentSn" field. It is called by the builders before save.
|
||||
linepoint.CurrentSnValidator = linepointDescCurrentSn.Validators[0].(func(string) error)
|
||||
// linepointDescOrderNo is the schema descriptor for orderNo field.
|
||||
linepointDescOrderNo := linepointFields[7].Descriptor()
|
||||
// linepoint.DefaultOrderNo holds the default value on creation for the orderNo field.
|
||||
linepoint.DefaultOrderNo = linepointDescOrderNo.Default.(string)
|
||||
// linepoint.OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
linepoint.OrderNoValidator = linepointDescOrderNo.Validators[0].(func(string) error)
|
||||
// linepointDescOccupied is the schema descriptor for occupied field.
|
||||
linepointDescOccupied := linepointFields[8].Descriptor()
|
||||
// linepoint.DefaultOccupied holds the default value on creation for the occupied field.
|
||||
linepoint.DefaultOccupied = linepointDescOccupied.Default.(bool)
|
||||
// linepointDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
linepointDescUpdatedAt := linepointFields[9].Descriptor()
|
||||
// linepoint.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
linepoint.DefaultUpdatedAt = linepointDescUpdatedAt.Default.(func() time.Time)
|
||||
// linepoint.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
linepoint.UpdateDefaultUpdatedAt = linepointDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// linepointDescID is the schema descriptor for id field.
|
||||
linepointDescID := linepointFields[0].Descriptor()
|
||||
// linepoint.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
linepoint.IDValidator = linepointDescID.Validators[0].(func(int) error)
|
||||
materialrequestFields := schema.MaterialRequest{}.Fields()
|
||||
_ = materialrequestFields
|
||||
// materialrequestDescRequestNo is the schema descriptor for requestNo field.
|
||||
@@ -406,6 +460,62 @@ func init() {
|
||||
permissionDescID := permissionFields[0].Descriptor()
|
||||
// permission.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
permission.IDValidator = permissionDescID.Validators[0].(func(int) error)
|
||||
plcmovecmdFields := schema.PlcMoveCmd{}.Fields()
|
||||
_ = plcmovecmdFields
|
||||
// plcmovecmdDescCmdNo is the schema descriptor for cmdNo field.
|
||||
plcmovecmdDescCmdNo := plcmovecmdFields[1].Descriptor()
|
||||
// plcmovecmd.CmdNoValidator is a validator for the "cmdNo" field. It is called by the builders before save.
|
||||
plcmovecmd.CmdNoValidator = plcmovecmdDescCmdNo.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescSn is the schema descriptor for sn field.
|
||||
plcmovecmdDescSn := plcmovecmdFields[2].Descriptor()
|
||||
// plcmovecmd.SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
||||
plcmovecmd.SnValidator = plcmovecmdDescSn.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescOrderNo is the schema descriptor for orderNo field.
|
||||
plcmovecmdDescOrderNo := plcmovecmdFields[3].Descriptor()
|
||||
// plcmovecmd.DefaultOrderNo holds the default value on creation for the orderNo field.
|
||||
plcmovecmd.DefaultOrderNo = plcmovecmdDescOrderNo.Default.(string)
|
||||
// plcmovecmd.OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
plcmovecmd.OrderNoValidator = plcmovecmdDescOrderNo.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescFromPoint is the schema descriptor for fromPoint field.
|
||||
plcmovecmdDescFromPoint := plcmovecmdFields[4].Descriptor()
|
||||
// plcmovecmd.FromPointValidator is a validator for the "fromPoint" field. It is called by the builders before save.
|
||||
plcmovecmd.FromPointValidator = plcmovecmdDescFromPoint.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescToPoint is the schema descriptor for toPoint field.
|
||||
plcmovecmdDescToPoint := plcmovecmdFields[5].Descriptor()
|
||||
// plcmovecmd.ToPointValidator is a validator for the "toPoint" field. It is called by the builders before save.
|
||||
plcmovecmd.ToPointValidator = plcmovecmdDescToPoint.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescStatus is the schema descriptor for status field.
|
||||
plcmovecmdDescStatus := plcmovecmdFields[6].Descriptor()
|
||||
// plcmovecmd.DefaultStatus holds the default value on creation for the status field.
|
||||
plcmovecmd.DefaultStatus = plcmovecmdDescStatus.Default.(string)
|
||||
// plcmovecmd.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
plcmovecmd.StatusValidator = plcmovecmdDescStatus.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescOperator is the schema descriptor for operator field.
|
||||
plcmovecmdDescOperator := plcmovecmdFields[7].Descriptor()
|
||||
// plcmovecmd.DefaultOperator holds the default value on creation for the operator field.
|
||||
plcmovecmd.DefaultOperator = plcmovecmdDescOperator.Default.(string)
|
||||
// plcmovecmd.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
||||
plcmovecmd.OperatorValidator = plcmovecmdDescOperator.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescMessage is the schema descriptor for message field.
|
||||
plcmovecmdDescMessage := plcmovecmdFields[8].Descriptor()
|
||||
// plcmovecmd.DefaultMessage holds the default value on creation for the message field.
|
||||
plcmovecmd.DefaultMessage = plcmovecmdDescMessage.Default.(string)
|
||||
// plcmovecmd.MessageValidator is a validator for the "message" field. It is called by the builders before save.
|
||||
plcmovecmd.MessageValidator = plcmovecmdDescMessage.Validators[0].(func(string) error)
|
||||
// plcmovecmdDescCreatedAt is the schema descriptor for createdAt field.
|
||||
plcmovecmdDescCreatedAt := plcmovecmdFields[9].Descriptor()
|
||||
// plcmovecmd.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
plcmovecmd.DefaultCreatedAt = plcmovecmdDescCreatedAt.Default.(func() time.Time)
|
||||
// plcmovecmdDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
plcmovecmdDescUpdatedAt := plcmovecmdFields[10].Descriptor()
|
||||
// plcmovecmd.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
plcmovecmd.DefaultUpdatedAt = plcmovecmdDescUpdatedAt.Default.(func() time.Time)
|
||||
// plcmovecmd.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
plcmovecmd.UpdateDefaultUpdatedAt = plcmovecmdDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// plcmovecmdDescID is the schema descriptor for id field.
|
||||
plcmovecmdDescID := plcmovecmdFields[0].Descriptor()
|
||||
// plcmovecmd.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
plcmovecmd.IDValidator = plcmovecmdDescID.Validators[0].(func(int) error)
|
||||
plcsendlogFields := schema.PlcSendLog{}.Fields()
|
||||
_ = plcsendlogFields
|
||||
// plcsendlogDescOrderNo is the schema descriptor for orderNo field.
|
||||
@@ -463,29 +573,29 @@ func init() {
|
||||
// processflow.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
processflow.NameValidator = processflowDescName.Validators[0].(func(string) error)
|
||||
// processflowDescPdfFile is the schema descriptor for pdfFile field.
|
||||
processflowDescPdfFile := processflowFields[3].Descriptor()
|
||||
processflowDescPdfFile := processflowFields[2].Descriptor()
|
||||
// processflow.DefaultPdfFile holds the default value on creation for the pdfFile field.
|
||||
processflow.DefaultPdfFile = processflowDescPdfFile.Default.(string)
|
||||
// processflow.PdfFileValidator is a validator for the "pdfFile" field. It is called by the builders before save.
|
||||
processflow.PdfFileValidator = processflowDescPdfFile.Validators[0].(func(string) error)
|
||||
// processflowDescStatus is the schema descriptor for status field.
|
||||
processflowDescStatus := processflowFields[4].Descriptor()
|
||||
processflowDescStatus := processflowFields[3].Descriptor()
|
||||
// processflow.DefaultStatus holds the default value on creation for the status field.
|
||||
processflow.DefaultStatus = processflowDescStatus.Default.(string)
|
||||
// processflow.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
processflow.StatusValidator = processflowDescStatus.Validators[0].(func(string) error)
|
||||
// processflowDescRemark is the schema descriptor for remark field.
|
||||
processflowDescRemark := processflowFields[5].Descriptor()
|
||||
processflowDescRemark := processflowFields[4].Descriptor()
|
||||
// processflow.DefaultRemark holds the default value on creation for the remark field.
|
||||
processflow.DefaultRemark = processflowDescRemark.Default.(string)
|
||||
// processflow.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
processflow.RemarkValidator = processflowDescRemark.Validators[0].(func(string) error)
|
||||
// processflowDescCreatedAt is the schema descriptor for createdAt field.
|
||||
processflowDescCreatedAt := processflowFields[6].Descriptor()
|
||||
processflowDescCreatedAt := processflowFields[5].Descriptor()
|
||||
// processflow.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
processflow.DefaultCreatedAt = processflowDescCreatedAt.Default.(func() time.Time)
|
||||
// processflowDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
processflowDescUpdatedAt := processflowFields[7].Descriptor()
|
||||
processflowDescUpdatedAt := processflowFields[6].Descriptor()
|
||||
// processflow.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
processflow.DefaultUpdatedAt = processflowDescUpdatedAt.Default.(func() time.Time)
|
||||
// processflow.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
@@ -494,26 +604,62 @@ func init() {
|
||||
processflowDescID := processflowFields[0].Descriptor()
|
||||
// processflow.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
processflow.IDValidator = processflowDescID.Validators[0].(func(int) error)
|
||||
processrouteFields := schema.ProcessRoute{}.Fields()
|
||||
_ = processrouteFields
|
||||
// processrouteDescName is the schema descriptor for name field.
|
||||
processrouteDescName := processrouteFields[1].Descriptor()
|
||||
// processroute.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
processroute.NameValidator = processrouteDescName.Validators[0].(func(string) error)
|
||||
// processrouteDescStatus is the schema descriptor for status field.
|
||||
processrouteDescStatus := processrouteFields[3].Descriptor()
|
||||
// processroute.DefaultStatus holds the default value on creation for the status field.
|
||||
processroute.DefaultStatus = processrouteDescStatus.Default.(string)
|
||||
// processroute.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
processroute.StatusValidator = processrouteDescStatus.Validators[0].(func(string) error)
|
||||
// processrouteDescRemark is the schema descriptor for remark field.
|
||||
processrouteDescRemark := processrouteFields[4].Descriptor()
|
||||
// processroute.DefaultRemark holds the default value on creation for the remark field.
|
||||
processroute.DefaultRemark = processrouteDescRemark.Default.(string)
|
||||
// processroute.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
processroute.RemarkValidator = processrouteDescRemark.Validators[0].(func(string) error)
|
||||
// processrouteDescCreatedAt is the schema descriptor for createdAt field.
|
||||
processrouteDescCreatedAt := processrouteFields[5].Descriptor()
|
||||
// processroute.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
processroute.DefaultCreatedAt = processrouteDescCreatedAt.Default.(func() time.Time)
|
||||
// processrouteDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
processrouteDescUpdatedAt := processrouteFields[6].Descriptor()
|
||||
// processroute.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
processroute.DefaultUpdatedAt = processrouteDescUpdatedAt.Default.(func() time.Time)
|
||||
// processroute.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
processroute.UpdateDefaultUpdatedAt = processrouteDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// processrouteDescID is the schema descriptor for id field.
|
||||
processrouteDescID := processrouteFields[0].Descriptor()
|
||||
// processroute.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
processroute.IDValidator = processrouteDescID.Validators[0].(func(int) error)
|
||||
processstepFields := schema.ProcessStep{}.Fields()
|
||||
_ = processstepFields
|
||||
// processstepDescSeq is the schema descriptor for seq field.
|
||||
processstepDescSeq := processstepFields[3].Descriptor()
|
||||
processstepDescSeq := processstepFields[2].Descriptor()
|
||||
// processstep.DefaultSeq holds the default value on creation for the seq field.
|
||||
processstep.DefaultSeq = processstepDescSeq.Default.(int)
|
||||
// processstepDescName is the schema descriptor for name field.
|
||||
processstepDescName := processstepFields[4].Descriptor()
|
||||
processstepDescName := processstepFields[3].Descriptor()
|
||||
// processstep.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
processstep.NameValidator = processstepDescName.Validators[0].(func(string) error)
|
||||
// processstepDescCollectType is the schema descriptor for collectType field.
|
||||
processstepDescCollectType := processstepFields[5].Descriptor()
|
||||
processstepDescCollectType := processstepFields[4].Descriptor()
|
||||
// processstep.DefaultCollectType holds the default value on creation for the collectType field.
|
||||
processstep.DefaultCollectType = processstepDescCollectType.Default.(string)
|
||||
// processstep.CollectTypeValidator is a validator for the "collectType" field. It is called by the builders before save.
|
||||
processstep.CollectTypeValidator = processstepDescCollectType.Validators[0].(func(string) error)
|
||||
// processstepDescIsTorque is the schema descriptor for isTorque field.
|
||||
processstepDescIsTorque := processstepFields[6].Descriptor()
|
||||
processstepDescIsTorque := processstepFields[5].Descriptor()
|
||||
// processstep.DefaultIsTorque holds the default value on creation for the isTorque field.
|
||||
processstep.DefaultIsTorque = processstepDescIsTorque.Default.(bool)
|
||||
// processstepDescNeedCheck is the schema descriptor for needCheck field.
|
||||
processstepDescNeedCheck := processstepFields[6].Descriptor()
|
||||
// processstep.DefaultNeedCheck holds the default value on creation for the needCheck field.
|
||||
processstep.DefaultNeedCheck = processstepDescNeedCheck.Default.(bool)
|
||||
// processstepDescRemark is the schema descriptor for remark field.
|
||||
processstepDescRemark := processstepFields[7].Descriptor()
|
||||
// processstep.DefaultRemark holds the default value on creation for the remark field.
|
||||
@@ -592,6 +738,32 @@ func init() {
|
||||
roleDescID := roleFields[0].Descriptor()
|
||||
// role.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
role.IDValidator = roleDescID.Validators[0].(func(int) error)
|
||||
routesegmentFields := schema.RouteSegment{}.Fields()
|
||||
_ = routesegmentFields
|
||||
// routesegmentDescSeq is the schema descriptor for seq field.
|
||||
routesegmentDescSeq := routesegmentFields[2].Descriptor()
|
||||
// routesegment.DefaultSeq holds the default value on creation for the seq field.
|
||||
routesegment.DefaultSeq = routesegmentDescSeq.Default.(int)
|
||||
// routesegmentDescSegmentType is the schema descriptor for segmentType field.
|
||||
routesegmentDescSegmentType := routesegmentFields[5].Descriptor()
|
||||
// routesegment.DefaultSegmentType holds the default value on creation for the segmentType field.
|
||||
routesegment.DefaultSegmentType = routesegmentDescSegmentType.Default.(string)
|
||||
// routesegment.SegmentTypeValidator is a validator for the "segmentType" field. It is called by the builders before save.
|
||||
routesegment.SegmentTypeValidator = routesegmentDescSegmentType.Validators[0].(func(string) error)
|
||||
// routesegmentDescRemark is the schema descriptor for remark field.
|
||||
routesegmentDescRemark := routesegmentFields[6].Descriptor()
|
||||
// routesegment.DefaultRemark holds the default value on creation for the remark field.
|
||||
routesegment.DefaultRemark = routesegmentDescRemark.Default.(string)
|
||||
// routesegment.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
routesegment.RemarkValidator = routesegmentDescRemark.Validators[0].(func(string) error)
|
||||
// routesegmentDescCreatedAt is the schema descriptor for createdAt field.
|
||||
routesegmentDescCreatedAt := routesegmentFields[7].Descriptor()
|
||||
// routesegment.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
routesegment.DefaultCreatedAt = routesegmentDescCreatedAt.Default.(func() time.Time)
|
||||
// routesegmentDescID is the schema descriptor for id field.
|
||||
routesegmentDescID := routesegmentFields[0].Descriptor()
|
||||
// routesegment.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
routesegment.IDValidator = routesegmentDescID.Validators[0].(func(int) error)
|
||||
scanrecordFields := schema.ScanRecord{}.Fields()
|
||||
_ = scanrecordFields
|
||||
// scanrecordDescStation is the schema descriptor for station field.
|
||||
@@ -680,14 +852,20 @@ func init() {
|
||||
station.DefaultName = stationDescName.Default.(string)
|
||||
// station.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
station.NameValidator = stationDescName.Validators[0].(func(string) error)
|
||||
// stationDescStationType is the schema descriptor for stationType field.
|
||||
stationDescStationType := stationFields[4].Descriptor()
|
||||
// station.DefaultStationType holds the default value on creation for the stationType field.
|
||||
station.DefaultStationType = stationDescStationType.Default.(string)
|
||||
// station.StationTypeValidator is a validator for the "stationType" field. It is called by the builders before save.
|
||||
station.StationTypeValidator = stationDescStationType.Validators[0].(func(string) error)
|
||||
// stationDescStatus is the schema descriptor for status field.
|
||||
stationDescStatus := stationFields[4].Descriptor()
|
||||
stationDescStatus := stationFields[5].Descriptor()
|
||||
// station.DefaultStatus holds the default value on creation for the status field.
|
||||
station.DefaultStatus = stationDescStatus.Default.(string)
|
||||
// station.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
station.StatusValidator = stationDescStatus.Validators[0].(func(string) error)
|
||||
// stationDescCreatedAt is the schema descriptor for createdAt field.
|
||||
stationDescCreatedAt := stationFields[5].Descriptor()
|
||||
stationDescCreatedAt := stationFields[6].Descriptor()
|
||||
// station.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
station.DefaultCreatedAt = stationDescCreatedAt.Default.(func() time.Time)
|
||||
// stationDescID is the schema descriptor for id field.
|
||||
@@ -930,48 +1108,42 @@ func init() {
|
||||
workorder.DefaultProductCode = workorderDescProductCode.Default.(string)
|
||||
// workorder.ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
|
||||
workorder.ProductCodeValidator = workorderDescProductCode.Validators[0].(func(string) error)
|
||||
// workorderDescBomName is the schema descriptor for bomName field.
|
||||
workorderDescBomName := workorderFields[4].Descriptor()
|
||||
// workorder.DefaultBomName holds the default value on creation for the bomName field.
|
||||
workorder.DefaultBomName = workorderDescBomName.Default.(string)
|
||||
// workorder.BomNameValidator is a validator for the "bomName" field. It is called by the builders before save.
|
||||
workorder.BomNameValidator = workorderDescBomName.Validators[0].(func(string) error)
|
||||
// workorderDescProductName is the schema descriptor for productName field.
|
||||
workorderDescProductName := workorderFields[5].Descriptor()
|
||||
workorderDescProductName := workorderFields[4].Descriptor()
|
||||
// workorder.DefaultProductName holds the default value on creation for the productName field.
|
||||
workorder.DefaultProductName = workorderDescProductName.Default.(string)
|
||||
// workorder.ProductNameValidator is a validator for the "productName" field. It is called by the builders before save.
|
||||
workorder.ProductNameValidator = workorderDescProductName.Validators[0].(func(string) error)
|
||||
// workorderDescQuantity is the schema descriptor for quantity field.
|
||||
workorderDescQuantity := workorderFields[6].Descriptor()
|
||||
workorderDescQuantity := workorderFields[5].Descriptor()
|
||||
// workorder.DefaultQuantity holds the default value on creation for the quantity field.
|
||||
workorder.DefaultQuantity = workorderDescQuantity.Default.(int)
|
||||
// workorderDescFinishedNum is the schema descriptor for finishedNum field.
|
||||
workorderDescFinishedNum := workorderFields[7].Descriptor()
|
||||
workorderDescFinishedNum := workorderFields[6].Descriptor()
|
||||
// workorder.DefaultFinishedNum holds the default value on creation for the finishedNum field.
|
||||
workorder.DefaultFinishedNum = workorderDescFinishedNum.Default.(int)
|
||||
// workorderDescFailNum is the schema descriptor for failNum field.
|
||||
workorderDescFailNum := workorderFields[8].Descriptor()
|
||||
workorderDescFailNum := workorderFields[7].Descriptor()
|
||||
// workorder.DefaultFailNum holds the default value on creation for the failNum field.
|
||||
workorder.DefaultFailNum = workorderDescFailNum.Default.(int)
|
||||
// workorderDescProcessSeq is the schema descriptor for processSeq field.
|
||||
workorderDescProcessSeq := workorderFields[9].Descriptor()
|
||||
workorderDescProcessSeq := workorderFields[8].Descriptor()
|
||||
// workorder.DefaultProcessSeq holds the default value on creation for the processSeq field.
|
||||
workorder.DefaultProcessSeq = workorderDescProcessSeq.Default.(string)
|
||||
// workorder.ProcessSeqValidator is a validator for the "processSeq" field. It is called by the builders before save.
|
||||
workorder.ProcessSeqValidator = workorderDescProcessSeq.Validators[0].(func(string) error)
|
||||
// workorderDescStatus is the schema descriptor for status field.
|
||||
workorderDescStatus := workorderFields[10].Descriptor()
|
||||
workorderDescStatus := workorderFields[11].Descriptor()
|
||||
// workorder.DefaultStatus holds the default value on creation for the status field.
|
||||
workorder.DefaultStatus = workorderDescStatus.Default.(string)
|
||||
// workorder.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
workorder.StatusValidator = workorderDescStatus.Validators[0].(func(string) error)
|
||||
// workorderDescCreatedAt is the schema descriptor for createdAt field.
|
||||
workorderDescCreatedAt := workorderFields[15].Descriptor()
|
||||
workorderDescCreatedAt := workorderFields[16].Descriptor()
|
||||
// workorder.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
workorder.DefaultCreatedAt = workorderDescCreatedAt.Default.(func() time.Time)
|
||||
// workorderDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
workorderDescUpdatedAt := workorderFields[16].Descriptor()
|
||||
workorderDescUpdatedAt := workorderFields[17].Descriptor()
|
||||
// workorder.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
workorder.DefaultUpdatedAt = workorderDescUpdatedAt.Default.(func() time.Time)
|
||||
// workorder.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
|
||||
Reference in New Issue
Block a user