// 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 TableNameUser = "users"

// User mapped from table <users>
type User struct {
	ID                                 string          `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"`
	MerchantID                         *string         `gorm:"column:merchant_id;type:character(26);index:users_merchant_id_idx,priority:1" json:"merchant_id"`
	NickName                           *string         `gorm:"column:nick_name;type:character varying(100);index:users_nick_name_idx,priority:2" json:"nick_name"`
	Email                              *string         `gorm:"column:email;type:character varying(200);index:users_nick_name_idx,priority:1" json:"email"`
	Password                           *string         `gorm:"column:password;type:character varying(300)" json:"password"`
	IsActive                           *bool           `gorm:"column:is_active;type:boolean;default:true" json:"is_active"`
	UsersRoleID                        *string         `gorm:"column:users_role_id;type:character(26)" json:"users_role_id"`
	Blocked                            *bool           `gorm:"column:blocked;type:boolean" json:"blocked"`
	BlockedNotes                       *string         `gorm:"column:blocked_notes;type:character varying(500)" json:"blocked_notes"`
	CreatedBy                          *string         `gorm:"column:created_by;type:character(26);index:users_created_by_idx,priority:1" 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"`
	BasicPricing_ByCreatedBy_Relation  []BasicPricing  `gorm:"foreignKey:created_by;references:id" json:"basic_pricing_by_created_by_relation"`
	City_ByCreatedBy_Relation          []City          `gorm:"foreignKey:created_by;references:id" json:"city_by_created_by_relation"`
	CostComponent_ByCreatedBy_Relation []CostComponent `gorm:"foreignKey:created_by;references:id" json:"cost_component_by_created_by_relation"`
	District_ByCreatedBy_Relation      []District      `gorm:"foreignKey:created_by;references:id" json:"district_by_created_by_relation"`
	Merchant_ByCreatedBy_Relation      []Merchant      `gorm:"foreignKey:created_by;references:id" json:"merchant_by_created_by_relation"`
	PostalCode_ByCreatedBy_Relation    []PostalCode    `gorm:"foreignKey:created_by;references:id" json:"postal_code_by_created_by_relation"`
	Province_ByCreatedBy_Relation      []Province      `gorm:"foreignKey:created_by;references:id" json:"province_by_created_by_relation"`
	Subdistrict_ByCreatedBy_Relation   []Subdistrict   `gorm:"foreignKey:created_by;references:id" json:"subdistrict_by_created_by_relation"`
	Merchant_Relation                  *Merchant       `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"`
	UsersRole_Relation                 *UsersRole      `gorm:"foreignKey:users_role_id;references:id" json:"users_role_relation"`
}

// TableName User's table name
func (*User) TableName() string {
	return TableNameUser
}
