-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity.go
30 lines (24 loc) · 942 Bytes
/
entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package property_type2property_view_type
import (
"time"
"gorm.io/gorm"
)
const (
EntityName = "propertyType2PropertyViewType"
TableName = "property_type2property_view_type"
)
// PropertyType2PropertyViewType ...
type PropertyType2PropertyViewType struct {
PropertyTypeID uint `gorm:"type:bigint not null REFERENCES \"property_type\"(id);primaryKey" json:"propertyTypeID"`
PropertyViewTypeID uint `gorm:"type:bigint not null REFERENCES \"property_view_type\"(id);primaryKey" json:"propertyViewTypeID"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt,omitempty"`
}
func (e *PropertyType2PropertyViewType) TableName() string {
return TableName
}
// New func is a constructor for the EntityType
func New() *PropertyType2PropertyViewType {
return &PropertyType2PropertyViewType{}
}