51 lines
4.0 KiB
Go
51 lines
4.0 KiB
Go
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
package domain
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const TableNameMerchant = "merchant"
|
|
|
|
// Merchant mapped from table <merchant>
|
|
type Merchant struct {
|
|
ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"`
|
|
Name *string `gorm:"column:name;type:character varying(255);index:merchant_name_idx,priority:3" json:"name"`
|
|
Address *string `gorm:"column:address;type:character varying(500);index:merchant_name_idx,priority:1" json:"address"`
|
|
Email *string `gorm:"column:email;type:character varying(200);index:merchant_name_idx,priority:2" json:"email"`
|
|
Telp *string `gorm:"column:telp;type:character varying(50);index:merchant_name_idx,priority:4" json:"telp"`
|
|
AdditionalInformation *string `gorm:"column:additional_information;type:jsonb;index:merchant_additional_information_idx,priority:1;default:{}" json:"additional_information"`
|
|
Active *bool `gorm:"column:active;type:boolean;default:true" json:"active"`
|
|
CreatedBy *string `gorm:"column:created_by;type:character(26)" json:"created_by"`
|
|
CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone;default:now()" json:"created_on"`
|
|
UpdatedBy *string `gorm:"column:updated_by;type:character(26)" json:"updated_by"`
|
|
UpdatedOn *time.Time `gorm:"column:updated_on;type:timestamp without time zone;default:now()" json:"updated_on"`
|
|
ProvinceID *string `gorm:"column:province_id;type:character(26);index:merchant_province_id_idx,priority:1" json:"province_id"`
|
|
CityID *string `gorm:"column:city_id;type:character(26);index:merchant_city_id_idx,priority:1" json:"city_id"`
|
|
DistrictID *string `gorm:"column:district_id;type:character(26);index:merchant_district_id_idx,priority:1" json:"district_id"`
|
|
SubdistrictID *string `gorm:"column:subdistrict_id;type:character(26);index:merchant_subdistrict_id_idx,priority:1" json:"subdistrict_id"`
|
|
PostalCode *string `gorm:"column:postal_code;type:character(26);index:merchant_postal_code_idx,priority:1" json:"postal_code"`
|
|
Province_Relation *Province `gorm:"foreignKey:province_id;references:id" json:"province_relation"`
|
|
City_Relation *City `gorm:"foreignKey:city_id;references:id" json:"city_relation"`
|
|
District_Relation *District `gorm:"foreignKey:district_id;references:id" json:"district_relation"`
|
|
Subdistrict_Relation *Subdistrict `gorm:"foreignKey:subdistrict_id;references:id" json:"subdistrict_relation"`
|
|
UsersRoless_Relation []*UsersRole `gorm:"foreignKey:merchant_id;references:id" json:"users_roless_relation"`
|
|
Modas_Relation []*Moda `gorm:"foreignKey:merchant_id;references:id" json:"modas_relation"`
|
|
PackageTypes_Relation []*PackageType `gorm:"foreignKey:merchant_id;references:id" json:"package_types_relation"`
|
|
Userss_Relation []*User `gorm:"foreignKey:merchant_id;references:id" json:"userss_relation"`
|
|
CreatedBy_Relation *User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"`
|
|
Provinces_Relation []*Province `gorm:"foreignKey:merchant_id;references:id" json:"provinces_relation"`
|
|
Citys_Relation []*City `gorm:"foreignKey:merchant_id;references:id" json:"citys_relation"`
|
|
Districts_Relation []*District `gorm:"foreignKey:merchant_id;references:id" json:"districts_relation"`
|
|
Subdistricts_Relation []*Subdistrict `gorm:"foreignKey:merchant_id;references:id" json:"subdistricts_relation"`
|
|
PostalCodes_Relation []*PostalCode `gorm:"foreignKey:merchant_id;references:id" json:"postal_codes_relation"`
|
|
}
|
|
|
|
// TableName Merchant's table name
|
|
func (*Merchant) TableName() string {
|
|
return TableNameMerchant
|
|
}
|