device.go 952 B

12345678910111213141516171819202122232425262728
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. "gorm.io/gorm"
  8. )
  9. const TableNameDevice = "device"
  10. // Device mapped from table <device>
  11. type Device struct {
  12. DeviceNo string `gorm:"column:device_no;type:varchar(100);primaryKey" json:"device_no"`
  13. DeviceName string `gorm:"column:device_name;type:varchar(100);not null" json:"device_name"`
  14. DeviceType string `gorm:"column:device_type;type:varchar(100);not null" json:"device_type"`
  15. CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
  16. UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"`
  17. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime" json:"deleted_at"`
  18. }
  19. // TableName Device's table name
  20. func (*Device) TableName() string {
  21. return TableNameDevice
  22. }