You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.7 KiB

  1. // Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
  2. package pm
  3. import (
  4. "LAPP_LF_MOM_BACKEND/grmi"
  5. "xorm.io/core"
  6. )
  7. /******************************************************************************
  8. *
  9. * @Struct Name : AssetKpi
  10. *-----------------------------------------------------------------------------
  11. *
  12. * @Description : AssetKpi的实体映射
  13. *
  14. * @Author : 代码生成器创建
  15. *
  16. * @Date : 2021-04-13 11:00:13
  17. *
  18. ******************************************************************************/
  19. type AssetKpi struct {
  20. PlantNr int `xorm:"pk int 'PlantNr'" json:"PM_AssetKpi-PlantNr"`
  21. AssetNr int `xorm:"pk int 'AssetNr'" json:"PM_AssetKpi-AssetNr"`
  22. Kpi string `xorm:"pk varchar(20) 'Kpi'" json:"PM_AssetKpi-Kpi"`
  23. KpiName string `xorm:"varchar(40) 'KpiName' not null" json:"PM_AssetKpi-KpiName"`
  24. KpiType int `xorm:"int 'KpiType' not null" json:"PM_AssetKpi-KpiType"`
  25. TriggerStatus int `xorm:"int 'TriggerStatus' not null" json:"PM_AssetKpi-TriggerStatus"`
  26. ThresholdVal float64 `xorm:"decimal 'ThresholdVal' not null" json:"PM_AssetKpi-ThresholdVal"`
  27. ActualVal float64 `xorm:"decimal 'ActualVal' not null" json:"PM_AssetKpi-ActualVal"`
  28. ResetAttrNr int `xorm:"int 'ResetAttrNr' not null" json:"PM_AssetKpi-ResetAttrNr"`
  29. CounterVal int `xorm:"int 'CounterVal' not null" json:"PM_AssetKpi-CounterVal"`
  30. CounterCycle int `xorm:"int 'CounterCycle' not null" json:"PM_AssetKpi-CounterCycle"`
  31. CounterCycleVal int `xorm:"int 'CounterCycleVal' not null" json:"PM_AssetKpi-CounterCycleVal"`
  32. MainServiceNr int `xorm:"int 'MainServiceNr' not null" json:"PM_AssetKpi-MainServiceNr"`
  33. LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"PM_AssetKpi-LastModify"`
  34. LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"PM_AssetKpi-LastUser"`
  35. CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"PM_AssetKpi-CreateTime"`
  36. }
  37. /******************************************************************************
  38. *
  39. * @Function Name : GetKey
  40. *-----------------------------------------------------------------------------
  41. *
  42. * @Description : 获取实体的主键
  43. *
  44. * @Return Value : 实体的主键
  45. *
  46. * @Author : 代码生成器创建
  47. *
  48. * @Date : 2021-04-13 11:00:13
  49. *
  50. ******************************************************************************/
  51. func (self *AssetKpi) GetKey() core.PK {
  52. return core.PK{self.PlantNr, self.AssetNr, self.Kpi}
  53. }