广汽安道拓Acura项目MES后台
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.

67 lines
3.0 KiB

  1. // Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
  2. package pm
  3. import (
  4. "LAPP_ACURA_MOM_BACKEND/grmi"
  5. "xorm.io/core"
  6. )
  7. /******************************************************************************
  8. *
  9. * @Struct Name : Asset
  10. *-----------------------------------------------------------------------------
  11. *
  12. * @Description : Asset的实体映射
  13. *
  14. * @Author : 代码生成器创建
  15. *
  16. * @Date : 2021-10-08 13:20:42
  17. *
  18. ******************************************************************************/
  19. type Asset struct {
  20. PlantNr int `xorm:"pk int 'PlantNr'" json:"PM_Asset-PlantNr"`
  21. AssetNr int `xorm:"pk int 'AssetNr'" json:"PM_Asset-AssetNr"`
  22. Descr string `xorm:"varchar(40) 'Descr'" json:"PM_Asset-Descr"`
  23. AssetName string `xorm:"varchar(18) 'AssetName'" json:"PM_Asset-AssetName"`
  24. AssetType string `xorm:"varchar(20) 'AssetType'" json:"PM_Asset-AssetType"`
  25. Model string `xorm:"varchar(14) 'Model'" json:"PM_Asset-Model"`
  26. Year string `xorm:"varchar(4) 'Year'" json:"PM_Asset-Year"`
  27. SerialNo string `xorm:"varchar(40) 'SerialNo'" json:"PM_Asset-SerialNo"`
  28. TagNo string `xorm:"varchar(40) 'TagNo'" json:"PM_Asset-TagNo"`
  29. Maker string `xorm:"varchar(40) 'Maker'" json:"PM_Asset-Maker"`
  30. LocaNr int `xorm:"int 'LocaNr' not null" json:"PM_Asset-LocaNr"`
  31. AssetStatus int `xorm:"int 'AssetStatus' not null" json:"PM_Asset-AssetStatus"`
  32. Operator int `xorm:"int 'Operator' not null" json:"PM_Asset-Operator"`
  33. WeekModelId int `xorm:"int 'WeekModelId' not null" json:"PM_Asset-WeekModelId"`
  34. WorkCalEndarId int `xorm:"int 'WorkCalEndarId' not null" json:"PM_Asset-WorkCalEndarId"`
  35. CostCenterId string `xorm:"varchar(12) 'CostCenterId'" json:"PM_Asset-CostCenterId"`
  36. LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"PM_Asset-LastModify"`
  37. LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"PM_Asset-LastUser"`
  38. CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"PM_Asset-CreateTime"`
  39. Valst []Template `json:"valst" xorm:"-"`
  40. UnValst []Template `json:"unvalst" xorm:"-"`
  41. }
  42. /******************************************************************************
  43. *
  44. * @Function Name : GetKey
  45. *-----------------------------------------------------------------------------
  46. *
  47. * @Description : 获取实体的主键
  48. *
  49. * @Return Value : 实体的主键
  50. *
  51. * @Author : 代码生成器创建
  52. *
  53. * @Date : 2021-10-08 13:20:42
  54. *
  55. ******************************************************************************/
  56. func (self *Asset) GetKey() core.PK {
  57. return core.PK{self.PlantNr, self.AssetNr}
  58. }
  59. type TemplateAsset struct {
  60. AssetTemplateLst `xorm:"extends"`
  61. Template `xorm:"extends"`
  62. }