diff --git a/cmd/api/internal/domain/city.go b/cmd/api/internal/domain/city.go deleted file mode 100644 index 87a5275..0000000 --- a/cmd/api/internal/domain/city.go +++ /dev/null @@ -1,35 +0,0 @@ -// 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 TableNameCity = "city" - -// City mapped from table -type City 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:city_name_idx,priority:1" json:"name"` - ProvinceID *string `gorm:"column:province_id;type:character(26);index:city_province_id_idx,priority:1" json:"province_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:city_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" 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" json:"updated_on"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - PostalCodes_Relation []PostalCode `gorm:"foreignKey:city_id;references:id" json:"postal_codes_relation"` - Subdistricts_Relation []Subdistrict `gorm:"foreignKey:city_id;references:id" json:"subdistricts_relation"` - Districts_Relation []District `gorm:"foreignKey:city_id;references:id" json:"districts_relation"` - Province_Relation Province `gorm:"foreignKey:province_id;references:id" json:"province_relation"` - Merchants_Relation []Merchant `gorm:"foreignKey:city_id;references:id" json:"merchants_relation"` - CreatedBy_Relation User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName City's table name -func (*City) TableName() string { - return TableNameCity -} diff --git a/cmd/api/internal/domain/cost_component.go b/cmd/api/internal/domain/cost_component.go deleted file mode 100644 index 550a7d1..0000000 --- a/cmd/api/internal/domain/cost_component.go +++ /dev/null @@ -1,29 +0,0 @@ -// 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 TableNameCostComponent = "cost_component" - -// CostComponent mapped from table -type CostComponent 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:cost_component_name_idx,priority:1" json:"name"` - MerchantID *string `gorm:"column:merchant_id;type:character(26);index:cost_component_merchant_id_idx,priority:1" json:"merchant_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:cost_component_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"` - Inc *string `gorm:"column:inc;type:character varying" json:"inc"` - Code *string `gorm:"column:code;type:character varying(100)" json:"code"` -} - -// TableName CostComponent's table name -func (*CostComponent) TableName() string { - return TableNameCostComponent -} diff --git a/cmd/api/internal/domain/district.go b/cmd/api/internal/domain/district.go deleted file mode 100644 index f7bc39f..0000000 --- a/cmd/api/internal/domain/district.go +++ /dev/null @@ -1,36 +0,0 @@ -// 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 TableNameDistrict = "district" - -// District mapped from table -type District 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:district_name_idx,priority:1" json:"name"` - ProvinceID *string `gorm:"column:province_id;type:character(26);index:district_province_id_idx,priority:1" json:"province_id"` - CityID *string `gorm:"column:city_id;type:character(26);index:district_city_id_idx,priority:1" json:"city_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:district_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" 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" json:"updated_on"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - PostalCodes_Relation []PostalCode `gorm:"foreignKey:district_id;references:id" json:"postal_codes_relation"` - Subdistricts_Relation []Subdistrict `gorm:"foreignKey:district_id;references:id" json:"subdistricts_relation"` - Province_Relation Province `gorm:"foreignKey:province_id;references:id" json:"province_relation"` - City_Relation City `gorm:"foreignKey:city_id;references:id" json:"city_relation"` - Merchants_Relation []Merchant `gorm:"foreignKey:district_id;references:id" json:"merchants_relation"` - CreatedBy_Relation User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName District's table name -func (*District) TableName() string { - return TableNameDistrict -} diff --git a/cmd/api/internal/domain/merchant.go b/cmd/api/internal/domain/merchant.go deleted file mode 100644 index 72d318f..0000000 --- a/cmd/api/internal/domain/merchant.go +++ /dev/null @@ -1,50 +0,0 @@ -// 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 -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 -} diff --git a/cmd/api/internal/domain/moda.go b/cmd/api/internal/domain/moda.go deleted file mode 100644 index 1724532..0000000 --- a/cmd/api/internal/domain/moda.go +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TableNameModa = "moda" - -// Moda mapped from table -type Moda 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:moda_name_idx,priority:1" json:"name"` - MerchantID *string `gorm:"column:merchant_id;type:character(26);index:moda_merchant_id_idx,priority:1" json:"merchant_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:moda_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"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName Moda's table name -func (*Moda) TableName() string { - return TableNameModa -} diff --git a/cmd/api/internal/domain/package_type.go b/cmd/api/internal/domain/package_type.go deleted file mode 100644 index 85fd693..0000000 --- a/cmd/api/internal/domain/package_type.go +++ /dev/null @@ -1,28 +0,0 @@ -// 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 TableNamePackageType = "package_type" - -// PackageType mapped from table -type PackageType 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:package_type_name_idx,priority:1" json:"name"` - MerchantID *string `gorm:"column:merchant_id;type:character(26);index:package_type_merchant_id_idx,priority:1" json:"merchant_id"` - 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" json:"updated_on"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName PackageType's table name -func (*PackageType) TableName() string { - return TableNamePackageType -} diff --git a/cmd/api/internal/domain/postal_code.go b/cmd/api/internal/domain/postal_code.go deleted file mode 100644 index e2ed850..0000000 --- a/cmd/api/internal/domain/postal_code.go +++ /dev/null @@ -1,37 +0,0 @@ -// 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 TableNamePostalCode = "postal_code" - -// PostalCode mapped from table -type PostalCode struct { - ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"` - PostalCode *string `gorm:"column:postal_code;type:character varying(255);index:postal_code_postal_code_idx,priority:1" json:"postal_code"` - ProvinceID *string `gorm:"column:province_id;type:character(26);index:postal_code_province_id_idx,priority:1" json:"province_id"` - CityID *string `gorm:"column:city_id;type:character(26);index:postal_code_city_id_idx,priority:1" json:"city_id"` - DistrictID *string `gorm:"column:district_id;type:character(26);index:postal_code_district_id_idx,priority:1" json:"district_id"` - SubdistrictID *string `gorm:"column:subdistrict_id;type:character(26);index:postal_code_subdistrict_id_idx,priority:1" json:"subdistrict_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:postal_code_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" json:"created_on"` - UpdatedBy *string `gorm:"column:updated_by;type:character(26)" json:"updated_by"` - UpdatedOn *string `gorm:"column:updated_on;type:character varying" json:"updated_on"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - 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"` - CreatedBy_Relation User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName PostalCode's table name -func (*PostalCode) TableName() string { - return TableNamePostalCode -} diff --git a/cmd/api/internal/domain/province.go b/cmd/api/internal/domain/province.go deleted file mode 100644 index e712228..0000000 --- a/cmd/api/internal/domain/province.go +++ /dev/null @@ -1,34 +0,0 @@ -// 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 TableNameProvince = "province" - -// Province mapped from table -type Province 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:province_name_idx,priority:1" json:"name"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:province_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" 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" json:"updated_on"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - PostalCodes_Relation []PostalCode `gorm:"foreignKey:province_id;references:id" json:"postal_codes_relation"` - Subdistricts_Relation []Subdistrict `gorm:"foreignKey:province_id;references:id" json:"subdistricts_relation"` - Districts_Relation []District `gorm:"foreignKey:province_id;references:id" json:"districts_relation"` - Citys_Relation []City `gorm:"foreignKey:province_id;references:id" json:"citys_relation"` - Merchants_Relation []Merchant `gorm:"foreignKey:province_id;references:id" json:"merchants_relation"` - CreatedBy_Relation User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName Province's table name -func (*Province) TableName() string { - return TableNameProvince -} diff --git a/cmd/api/internal/domain/subdistrict.go b/cmd/api/internal/domain/subdistrict.go deleted file mode 100644 index ae3f9ac..0000000 --- a/cmd/api/internal/domain/subdistrict.go +++ /dev/null @@ -1,37 +0,0 @@ -// 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 TableNameSubdistrict = "subdistrict" - -// Subdistrict mapped from table -type Subdistrict 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:subdistrit_name_idx,priority:1" json:"name"` - ProvinceID *string `gorm:"column:province_id;type:character(26);index:subdistrit_province_id_idx,priority:1" json:"province_id"` - CityID *string `gorm:"column:city_id;type:character(26);index:subdistrit_city_id_idx,priority:1" json:"city_id"` - DistrictID *string `gorm:"column:district_id;type:character(26);index:subdistrit_district_id_idx,priority:1" json:"district_id"` - CreatedBy *string `gorm:"column:created_by;type:character(26);index:subdistrit_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" 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" json:"updated_on"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - PostalCodes_Relation []PostalCode `gorm:"foreignKey:subdistrict_id;references:id" json:"postal_codes_relation"` - 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"` - Merchants_Relation []Merchant `gorm:"foreignKey:subdistrict_id;references:id" json:"merchants_relation"` - CreatedBy_Relation User `gorm:"foreignKey:created_by;references:id" json:"created_by_relation"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` -} - -// TableName Subdistrict's table name -func (*Subdistrict) TableName() string { - return TableNameSubdistrict -} diff --git a/cmd/api/internal/domain/users.go b/cmd/api/internal/domain/users.go deleted file mode 100644 index 97e6e7a..0000000 --- a/cmd/api/internal/domain/users.go +++ /dev/null @@ -1,41 +0,0 @@ -// 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 -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"` - 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"` - Merchants_Relation []Merchant `gorm:"foreignKey:created_by;references:id" json:"merchants_relation"` - Provinces_Relation []Province `gorm:"foreignKey:created_by;references:id" json:"provinces_relation"` - Citys_Relation []City `gorm:"foreignKey:created_by;references:id" json:"citys_relation"` - Districts_Relation []District `gorm:"foreignKey:created_by;references:id" json:"districts_relation"` - Subdistricts_Relation []Subdistrict `gorm:"foreignKey:created_by;references:id" json:"subdistricts_relation"` - PostalCodes_Relation []PostalCode `gorm:"foreignKey:created_by;references:id" json:"postal_codes_relation"` -} - -// TableName User's table name -func (*User) TableName() string { - return TableNameUser -} diff --git a/cmd/api/internal/domain/users_.go b/cmd/api/internal/domain/users_.go deleted file mode 100644 index a813e21..0000000 --- a/cmd/api/internal/domain/users_.go +++ /dev/null @@ -1,29 +0,0 @@ -// 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 TableNameUsers = "users_" - -// Users mapped from table -type Users struct { - ID string `gorm:"column:id;type:uuid;primaryKey;default:gen_random_uuid()" json:"id"` - MerchantID *string `gorm:"column:merchant_id;type:uuid;index:idx_users_merchant,priority:1" json:"merchant_id"` - Username string `gorm:"column:username;type:character varying(50);not null;index:idx_users_username,priority:1" json:"username"` - Email string `gorm:"column:email;type:character varying(100);not null" json:"email"` - Password string `gorm:"column:password;type:character varying(200);not null" json:"password"` - Role string `gorm:"column:role;type:character varying(20);not null;default:cashier" json:"role"` - IsActive *bool `gorm:"column:is_active;type:boolean;default:true" json:"is_active"` - CreatedAt *time.Time `gorm:"column:created_at;type:timestamp without time zone;default:now()" json:"created_at"` - UpdatedAt *time.Time `gorm:"column:updated_at;type:timestamp without time zone;default:now()" json:"updated_at"` -} - -// TableName Users's table name -func (*Users) TableName() string { - return TableNameUsers -} diff --git a/cmd/api/internal/domain/users_roles.go b/cmd/api/internal/domain/users_roles.go deleted file mode 100644 index e3fe21f..0000000 --- a/cmd/api/internal/domain/users_roles.go +++ /dev/null @@ -1,30 +0,0 @@ -// 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 TableNameUsersRole = "users_roles" - -// UsersRole mapped from table -type UsersRole struct { - ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"` - Name *string `gorm:"column:name;type:character varying(255)" json:"name"` - MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` - 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"` - RoleKey string `gorm:"column:role_key;type:character varying(20);not null" json:"role_key"` - Merchant_Relation Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"` - Userss_Relation []User `gorm:"foreignKey:users_role_id;references:id" json:"userss_relation"` -} - -// TableName UsersRole's table name -func (*UsersRole) TableName() string { - return TableNameUsersRole -} diff --git a/internal/.DS_Store b/internal/.DS_Store new file mode 100644 index 0000000..528eb63 Binary files /dev/null and b/internal/.DS_Store differ diff --git a/internal/domain/province.go b/internal/domain/province.go index e712228..f0f819d 100644 --- a/internal/domain/province.go +++ b/internal/domain/province.go @@ -15,9 +15,9 @@ type Province 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:province_name_idx,priority:1" json:"name"` CreatedBy *string `gorm:"column:created_by;type:character(26);index:province_created_by_idx,priority:1" json:"created_by"` - CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" json:"created_on"` + CreatedOn *time.Time `gorm:"autoCreateTime;column:created_on;type:timestamp without time zone" 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" json:"updated_on"` + UpdatedOn *time.Time `gorm:"autoUpdateTime;column:updated_on;type:timestamp without time zone" json:"updated_on"` MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"` PostalCodes_Relation []PostalCode `gorm:"foreignKey:province_id;references:id" json:"postal_codes_relation"` Subdistricts_Relation []Subdistrict `gorm:"foreignKey:province_id;references:id" json:"subdistricts_relation"` diff --git a/internal/handlers/dto/datatable.go b/internal/handlers/dto/datatable.go new file mode 100644 index 0000000..4e5e3d3 --- /dev/null +++ b/internal/handlers/dto/datatable.go @@ -0,0 +1,40 @@ +package dto + +type DataTableRequest struct { + Draw int `json:"draw" binding:"required"` + Start int `json:"start"` + Length int `json:"length"` + Search DatatableSearchCriteria `json:"search"` + Order []DatatableOrderQuery `json:"order"` + Columns []DatatableColumnConfig `json:"columns"` + AdditionalFilter map[string]interface{} `json:"additional_filter"` +} +type DatatableOrderQuery struct { + Column int `json:"column"` // Indeks kolom yang di-sort (dimulai dari 0) + Dir string `json:"dir"` // Arah sorting: "asc" atau "desc" +} +type DatatableSearchCriteria struct { + Value string `json:"value"` + Regex bool `json:"regex"` +} + +type DatatableColumnConfig struct { + Data string `json:"data"` // Nama properti data (contoh: "name") + Name string `json:"name"` // Nama kolom opsional yang diset di frontend + Searchable bool `json:"searchable"` // Apakah kolom ini bisa dicari + Orderable bool `json:"orderable"` // Apakah kolom ini bisa di-sort + Search DatatableSearchCriteria `json:"search"` // Pencarian spesifik khusus untuk kolom ini saja +} + +type DataTableResponse struct { + Draw int `json:"draw"` + RecordsTotal int64 `json:"recordsTotal"` + RecordsFiltered int64 `json:"recordsFiltered"` + Data []map[string]interface{} `json:"data"` +} + +type DataTableColDef struct { + Field string `json:"field"` + Alias string `json:"alias"` + Formatter *func() `json:"formatter"` +} diff --git a/internal/handlers/dto/province.go b/internal/handlers/dto/province.go new file mode 100644 index 0000000..3f67d8d --- /dev/null +++ b/internal/handlers/dto/province.go @@ -0,0 +1,9 @@ +package dto + +type CreateProvinceRequest struct { + Name string `json:"name" binding:"required,min=2"` +} + +type UpdateProvinceRequest struct { + Name string `json:"name" binding:"required,min=2"` +} diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 1d3ee70..3bb72e1 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -2,6 +2,8 @@ package handlers import ( "cargo-erp-backend/internal/handlers/router/auth" + "cargo-erp-backend/internal/handlers/router/province" + "cargo-erp-backend/internal/middleware" "cargo-erp-backend/pkg/helpers" "fmt" "net/http" @@ -65,12 +67,30 @@ func (h *Handlers) ZapLoggerMiddleware(logger *zap.Logger) gin.HandlerFunc { } } } + +func (h *Handlers) CORSMiddleware() gin.HandlerFunc { + return func(c *gin.Context) { + c.Writer.Header().Set("Access-Control-Allow-Origin", "*") + c.Writer.Header().Set("Access-Control-Allow-Credentials", "true") + c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With") + c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, DELETE, PATCH") + + if c.Request.Method == "OPTIONS" { + c.AbortWithStatus(http.StatusNoContent) + return + } + + c.Next() + } +} + func (h *Handlers) Run() { host := fmt.Sprintf("%v", h.Helper.Config().Get("app.host")) port := fmt.Sprintf("%v", h.Helper.Config().Get("app.port")) r := gin.Default() r.Use(h.ZapLoggerMiddleware(h.Helper.Log())) r.Use(gin.Recovery()) + r.Use(h.CORSMiddleware()) r.GET("/ping", func(c *gin.Context) { c.JSON(http.StatusOK, gin.H{ "message": "pong", @@ -78,6 +98,18 @@ func (h *Handlers) Run() { }) //auth auth.NewAuthHandler(h.Helper, r).Router() + + //master-data + masterdata := r.Group("master-data") + masterdata.Use(middleware.NewAuthMiddleware(h.Helper).Check()) + //province + { + province.NewProvinceHandler(h.Helper, masterdata).Router() + + // regency / city (jika nanti ada) + // regency.NewRegencyHandler(h.Helper, masterdata).Router() + } + h.Helper.Log().Info("Starting Apps") r.Run(fmt.Sprintf("%v:%v", host, port)) } diff --git a/internal/handlers/router/auth/auth.go b/internal/handlers/router/auth/auth.go index 9e0682d..6b7b246 100644 --- a/internal/handlers/router/auth/auth.go +++ b/internal/handlers/router/auth/auth.go @@ -57,7 +57,9 @@ func (h *AuthHandler) Login(c *gin.Context) { true, // httpOnly ) - response.Success(c, map[string]interface{}{"token": token}) + response.Success(c, dto.AuthResponse{ + Token: token, + }) } func (h *AuthHandler) Logout(c *gin.Context) { auth_key := c.MustGet("auth_key") diff --git a/internal/handlers/router/province/province.go b/internal/handlers/router/province/province.go new file mode 100644 index 0000000..2bc08cc --- /dev/null +++ b/internal/handlers/router/province/province.go @@ -0,0 +1,169 @@ +package province + +import ( + "cargo-erp-backend/internal/handlers/dto" + "cargo-erp-backend/internal/usecases" + "cargo-erp-backend/pkg/helpers" + "cargo-erp-backend/pkg/response" + "net/http" + "strconv" + + "github.com/gin-gonic/gin" +) + +type ProvinceHandlerInterface interface { + Router() +} + +type ProvinceHandler struct { + Helper helpers.HelperInterface + Group *gin.RouterGroup +} + +func NewProvinceHandler(helper helpers.HelperInterface, g *gin.RouterGroup) ProvinceHandlerInterface { + return &ProvinceHandler{Helper: helper, Group: g} +} + +func (h *ProvinceHandler) Router() { + r := h.Group.Group("provinces") + { + r.GET("/", h.GetAll) + r.POST("/list", h.GetList) + r.GET("/:id", h.GetByID) + r.POST("/", h.Create) + r.PUT("/:id", h.Update) + r.DELETE("/:id", h.Delete) + } +} + +func (h *ProvinceHandler) GetAll(c *gin.Context) { + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + page, _ := strconv.Atoi(c.DefaultQuery("page", "1")) + limit, _ := strconv.Atoi(c.DefaultQuery("limit", "10")) + + if page < 1 { + page = 1 + } + if limit < 1 { + limit = 10 + } + + u := usecases.NewProvinceUsecase(h.Helper, *userid) + provinces, total, err := u.GetAll(page, limit) + if err != nil { + response.Error(c, http.StatusInternalServerError, err.Error()) + return + } + + response.PaginatedResponse(c, provinces, int(total), page, limit) +} + +func (h *ProvinceHandler) GetList(c *gin.Context) { + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + + var req dto.DataTableRequest + + // 1. Bind JSON request otomatis ke struct + if err := c.ShouldBindJSON(&req); err != nil { + response.Error(c, http.StatusBadRequest, "Request Format request invalid") + return + } + u := usecases.NewProvinceUsecase(h.Helper, *userid) + res, err := u.GetList(req) + if err != nil { + response.Error(c, http.StatusInternalServerError, err.Error()) + return + } + response.Success(c, res) + return +} + +func (h *ProvinceHandler) GetByID(c *gin.Context) { + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + id := c.Param("id") + + u := usecases.NewProvinceUsecase(h.Helper, *userid) + province, err := u.GetByID(id) + if err != nil { + response.Error(c, http.StatusNotFound, "province not found") + return + } + + response.Success(c, province) +} + +func (h *ProvinceHandler) Create(c *gin.Context) { + var req dto.CreateProvinceRequest + if err := c.BindJSON(&req); err != nil { + response.Error(c, http.StatusBadRequest, err.Error()) + return + } + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + createdBy := userid.ID + + u := usecases.NewProvinceUsecase(h.Helper, *userid) + province, err := u.Create(req.Name, createdBy) + if err != nil { + response.Error(c, http.StatusInternalServerError, err.Error()) + return + } + + response.Created(c, province) +} + +func (h *ProvinceHandler) Update(c *gin.Context) { + id := c.Param("id") + + var req dto.UpdateProvinceRequest + if err := c.BindJSON(&req); err != nil { + response.Error(c, http.StatusBadRequest, err.Error()) + return + } + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + updatedBy := userid.ID + + u := usecases.NewProvinceUsecase(h.Helper, *userid) + province, err := u.Update(id, req.Name, updatedBy) + if err != nil { + response.Error(c, http.StatusInternalServerError, err.Error()) + return + } + + response.Success(c, province) +} + +func (h *ProvinceHandler) Delete(c *gin.Context) { + userid, err := h.Helper.GetAuthInfo(c.GetString("auth")) + if err != nil { + response.Error(c, http.StatusUnauthorized, err.Error()) + return + } + id := c.Param("id") + u := usecases.NewProvinceUsecase(h.Helper, *userid) + if err := u.Delete(id); err != nil { + response.Error(c, http.StatusInternalServerError, err.Error()) + return + } + + response.Success(c, map[string]interface{}{"message": "province deleted"}) +} diff --git a/internal/usecases/auth.go b/internal/usecases/auth.go index e52e108..e06d7b4 100644 --- a/internal/usecases/auth.go +++ b/internal/usecases/auth.go @@ -26,7 +26,7 @@ func NewAuthUsecase(helper helpers.HelperInterface) AuthUsecaseInterface { func (u *AuthUsecase) Login(email string, password string) (token string, err error) { var user []domain.User db := u.Helper.GetDB("slave") - db.Model(&user).Where("email=?", email).Find(&user) + db.Model(&user).Where("email=?", email).Preload("UsersRole_Relation").Find(&user) for _, v := range user { pass := u.Helper.StringFromPtr(v.Password) if u.Helper.VerifyPassword(pass, password) { diff --git a/internal/usecases/province.go b/internal/usecases/province.go new file mode 100644 index 0000000..aeed999 --- /dev/null +++ b/internal/usecases/province.go @@ -0,0 +1,136 @@ +package usecases + +import ( + "cargo-erp-backend/internal/domain" + "cargo-erp-backend/internal/handlers/dto" + "cargo-erp-backend/pkg/datatable" + "cargo-erp-backend/pkg/helpers" + "time" +) + +type ProvinceUsecaseInterface interface { + GetAll(page int, limit int) ([]domain.Province, int64, error) + GetList(dto.DataTableRequest) (dto.DataTableResponse, error) + GetByID(id string) (domain.Province, error) + Create(name string, createdBy string) (domain.Province, error) + Update(id string, name string, updatedBy string) (domain.Province, error) + Delete(id string) error +} + +type ProvinceUsecase struct { + Helper helpers.HelperInterface + AuthUser domain.User +} + +func NewProvinceUsecase(helper helpers.HelperInterface, authUser domain.User) ProvinceUsecaseInterface { + return &ProvinceUsecase{Helper: helper, AuthUser: authUser} +} + +func (u *ProvinceUsecase) GetAll(page int, limit int) ([]domain.Province, int64, error) { + var provinces []domain.Province + var total int64 + + db := u.Helper.GetDB("slave") + if u.AuthUser.UsersRole_Relation.RoleKey != "SPM" { + db.Where(db.Where("merchant_id IS NULL").Or("merchant_id=?", u.AuthUser.MerchantID)) + } + db.Model(&domain.Province{}).Count(&total) + + offset := (page - 1) * limit + if err := db.Offset(offset).Limit(limit).Find(&provinces).Error; err != nil { + return nil, 0, err + } + + return provinces, total, nil +} + +func (u *ProvinceUsecase) GetList(req dto.DataTableRequest) (dto.DataTableResponse, error) { + // var provinces []domain.Province + var response dto.DataTableResponse + db := u.Helper.GetDB("slave") + tx := db.Table("province").Joins("LEFT JOIN merchant ON province.merchant_id=merchant.id") + dt := datatable.NewDatatable(tx, req) + coldef := make([]dto.DataTableColDef, 0) + coldef = append(coldef, dto.DataTableColDef{ + Field: "province.name", + Alias: "name", + Formatter: nil, + }) + coldef = append(coldef, dto.DataTableColDef{ + Field: "merchant.id", + Alias: "merchant_id", + Formatter: nil, + }) + + response = dt.Render(coldef) + // var total int64 + // db := u.Helper.GetDB("slave") + + return response, nil +} + +func (u *ProvinceUsecase) GetByID(id string) (domain.Province, error) { + var province domain.Province + + db := u.Helper.GetDB("slave") + + if err := db.Where("id = ?", id).First(&province).Error; err != nil { + return domain.Province{}, err + } + + return province, nil +} + +func (u *ProvinceUsecase) Create(name string, createdBy string) (domain.Province, error) { + now := time.Now() + province := domain.Province{ + Name: &name, + CreatedBy: &createdBy, + CreatedOn: &now, + UpdatedBy: &createdBy, + UpdatedOn: &now, + } + + db := u.Helper.GetDB("master") + + if err := db.Create(&province).Error; err != nil { + return domain.Province{}, err + } + + return province, nil +} + +func (u *ProvinceUsecase) Update(id string, name string, updatedBy string) (domain.Province, error) { + var province domain.Province + + db := u.Helper.GetDB("master") + if u.AuthUser.UsersRole_Relation.RoleKey != "SPM" { + db.Where("merchant_id=?", u.AuthUser.MerchantID) + } + if err := db.Where("id = ?", id).First(&province).Error; err != nil { + return domain.Province{}, err + } + + now := time.Now() + province.Name = &name + province.UpdatedBy = &updatedBy + province.UpdatedOn = &now + + if err := db.Save(&province).Error; err != nil { + return domain.Province{}, err + } + + return province, nil +} + +func (u *ProvinceUsecase) Delete(id string) error { + db := u.Helper.GetDB("master") + if u.AuthUser.UsersRole_Relation.RoleKey != "SPM" { + db.Where("merchant_id=?", u.AuthUser.MerchantID) + } + if err := db.Delete(&domain.Province{}, "id = ?", id).Error; err != nil { + return err + } + + return nil +} diff --git a/pkg/datatable/datatable.go b/pkg/datatable/datatable.go new file mode 100644 index 0000000..6e47c3c --- /dev/null +++ b/pkg/datatable/datatable.go @@ -0,0 +1,63 @@ +package datatable + +import ( + "cargo-erp-backend/internal/handlers/dto" + "fmt" + + "gorm.io/gorm" +) + +type DatatableInterface interface { + Render(coldef []dto.DataTableColDef) dto.DataTableResponse +} +type Datatable struct { + DB *gorm.DB + Req dto.DataTableRequest +} + +func NewDatatable(db *gorm.DB, table_request dto.DataTableRequest) DatatableInterface { + return &Datatable{ + DB: db, + Req: table_request, + } +} +func (d *Datatable) SetTable(db *gorm.DB) { + d.DB = db +} +func (d *Datatable) Render(coldef []dto.DataTableColDef) dto.DataTableResponse { + var totaldata int64 = 0 + d.DB.Count(&totaldata) + //select + selectAlias := make([]string, 0) + for _, v := range coldef { + selectAlias = append(selectAlias, fmt.Sprintf("%v AS %v", v.Field, v.Alias)) + } + d.DB.Select(selectAlias) + //global filter + if len(d.Req.Search.Value) > 0 { + for _, vcol := range d.Req.Columns { + if vcol.Searchable { + for _, v := range coldef { + d.DB.Or(fmt.Sprintf("%v::TEXT ILIKE '%%%v%%'", v.Field, d.Req.Search.Value)) + } + } + } + } + var totalFiltered int64 = 0 + d.DB.Count(&totalFiltered) + start := d.Req.Start + if start == 0 { + start = 1 + } + limit := d.Req.Length + d.DB.Limit(limit).Offset(start*limit - limit) + output := make([]map[string]interface{}, 0) + d.DB.Scan(&output) + result := dto.DataTableResponse{ + Draw: 1, + RecordsTotal: totaldata, + RecordsFiltered: totalFiltered, + Data: output, + } + return result +} diff --git a/pkg/helpers/helpers.go b/pkg/helpers/helpers.go index 4644f3f..aba8327 100644 --- a/pkg/helpers/helpers.go +++ b/pkg/helpers/helpers.go @@ -3,6 +3,7 @@ package helpers import ( "cargo-erp-backend/internal/config" "cargo-erp-backend/internal/database" + "cargo-erp-backend/internal/domain" "encoding/json" "github.com/redis/go-redis/v9" @@ -21,6 +22,7 @@ type HelperInterface interface { StringFromPtr(ptr *string) string StructTobyte(data interface{}) ([]byte, error) CloneStructWithoutField(input interface{}, field string) (map[string]interface{}, error) + GetAuthInfo(authinfo string) (*domain.User, error) } type Helper struct { Conf config.ConfigInterface @@ -90,3 +92,12 @@ func (h *Helper) CloneStructWithoutField(input interface{}, field string) (map[s return result, nil } + +func (h *Helper) GetAuthInfo(authinfo string) (*domain.User, error) { + + var auth domain.User + if err := json.Unmarshal([]byte(authinfo), &auth); err != nil { + return nil, err + } + return &auth, nil +} diff --git a/storage/logs/app.log b/storage/logs/app.log index 9a8d7c1..e0b4e20 100644 --- a/storage/logs/app.log +++ b/storage/logs/app.log @@ -461,3 +461,120 @@ {"level":"info","ts":"2026-08-16T17:36:56.644+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} {"level":"info","ts":"2026-08-16T17:36:57.127+0700","caller":"database/database.go:86","msg":"DB Connection Done"} {"level":"info","ts":"2026-08-16T17:36:57.678+0700","caller":"handlers/handlers.go:81","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T10:29:30.206+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:29:30.293+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:29:30.293+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:29:30.370+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:29:30.505+0700","caller":"handlers/handlers.go:95","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T10:30:39.989+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"OPTIONS","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.001828917,"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0"} +{"level":"warn","ts":"2026-08-17T10:33:58.902+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"OPTIONS","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.0015305,"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0"} +{"level":"info","ts":"2026-08-17T10:34:05.077+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:34:05.153+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:34:05.153+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:34:05.228+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:34:05.341+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T10:34:07.912+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":204,"method":"OPTIONS","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.000066167,"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0"} +{"level":"info","ts":"2026-08-17T10:34:25.474+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":204,"method":"OPTIONS","path":"/master-data/provinces/list","query":"search=bandung&page=1&per_page=25&sort_by=name&sort_order=asc","ip":"127.0.0.1","latency":0.002417083,"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0"} +{"level":"warn","ts":"2026-08-17T10:36:38.340+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.004616375,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:37:40.873+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:37:40.959+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:37:40.959+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:37:41.035+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:37:41.182+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T10:37:44.536+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.000008625,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:38:53.438+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:38:53.564+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:38:53.565+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:38:53.641+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:38:53.783+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T10:39:08.305+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/login","query":"","ip":"127.0.0.1","latency":0.205694166,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"warn","ts":"2026-08-17T10:39:15.811+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.000276792,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:41:52.486+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:41:52.652+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:41:52.652+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:41:52.730+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:41:53.044+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T10:41:58.525+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.000017292,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:42:12.992+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:42:13.073+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:42:13.073+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:42:13.143+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:42:37.593+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:42:37.681+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:42:37.681+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:42:37.758+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:42:37.860+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T10:42:39.472+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/data-master/provinces/list","query":"","ip":"127.0.0.1","latency":0.000014083,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:43:07.712+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T10:43:07.796+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T10:43:07.796+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T10:43:07.874+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T10:43:08.038+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T10:43:17.592+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"//master-data/provinces/ist","query":"","ip":"127.0.0.1","latency":0.001090084,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T10:43:23.980+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDE1NDgsImlhdCI6MTc4NjkzNzk0OH0.2WxnL-WmDO-oB8DwjETzfKSenV2bcYrOBeR2TfuN-Qc"} +{"level":"info","ts":"2026-08-17T10:43:24.022+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"warn","ts":"2026-08-17T10:43:24.152+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/master-data/provinces/ist","query":"","ip":"127.0.0.1","latency":0.1798295,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:03:30.161+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:03:30.246+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:03:30.246+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:03:30.321+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:03:30.423+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T12:03:36.865+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":401,"method":"GET","path":"/master-data/provinces/ist","query":"","ip":"127.0.0.1","latency":0.005462291,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:03:47.967+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/login","query":"","ip":"127.0.0.1","latency":0.28778225,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:03:52.193+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:03:52.215+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"warn","ts":"2026-08-17T12:03:52.269+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"GET","path":"/master-data/provinces/ist","query":"","ip":"127.0.0.1","latency":0.076235834,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:04:57.157+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:04:57.194+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"warn","ts":"2026-08-17T12:04:57.199+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":400,"method":"GET","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.042882084,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:42:48.630+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:42:48.716+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:42:48.716+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:42:48.793+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:42:48.921+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T12:47:49.617+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:47:49.696+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:47:49.696+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:47:49.764+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:47:49.892+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"warn","ts":"2026-08-17T12:47:54.735+0700","caller":"handlers/handlers.go:64","msg":"Client Error","status":404,"method":"POST","path":"/master-data/provinces/ist","query":"","ip":"127.0.0.1","latency":0.000009458,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:48:01.656+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:48:01.678+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:48:01.721+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.064290333,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:52:30.789+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:52:30.916+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:52:30.916+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:52:30.999+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:52:31.218+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T12:52:34.527+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:52:34.679+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:52:47.588+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:52:47.665+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:52:47.665+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:52:47.866+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:52:47.972+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T12:52:50.217+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:52:50.241+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:52:50.278+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.060729292,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:53:52.458+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:53:52.542+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:53:52.542+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:53:52.675+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:53:52.818+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T12:53:54.603+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:53:54.627+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:53:54.735+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.132095542,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:57:37.383+0700","caller":"database/database.go:53","msg":"Connect To Master DB"} +{"level":"info","ts":"2026-08-17T12:57:37.861+0700","caller":"database/database.go:63","msg":"DB Master Connected"} +{"level":"info","ts":"2026-08-17T12:57:37.862+0700","caller":"database/database.go:76","msg":"Connect To Slave DB"} +{"level":"info","ts":"2026-08-17T12:57:37.946+0700","caller":"database/database.go:86","msg":"DB Connection Done"} +{"level":"info","ts":"2026-08-17T12:57:38.067+0700","caller":"handlers/handlers.go:113","msg":"Starting Apps"} +{"level":"info","ts":"2026-08-17T12:57:42.942+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:57:42.963+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:57:43.053+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.110729292,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:58:05.752+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:58:05.777+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:58:05.864+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.112390334,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} +{"level":"info","ts":"2026-08-17T12:58:10.988+0700","caller":"middleware/auth.go:62","msg":"session_login : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxOWZmMTAzMWExMWMwYzAxM2Y2MDA0NGY1NiIsImlzcyI6ImNhcmdvLXBsYXRmb3JtIiwic3ViIjoiMTlmZjEwMzFhMTFjMGMwMTNmNjAwNDRmNTYiLCJleHAiOjE3ODY5NDY2MjcsImlhdCI6MTc4Njk0MzAyN30.w6NKrVkSKqtrnL83oFeMOdzvorSe6cQIiyE7WeMZ8tM"} +{"level":"info","ts":"2026-08-17T12:58:11.011+0700","caller":"middleware/auth.go:90","msg":"Set Auth : {\"blocked\":false,\"blocked_notes\":null,\"citys_relation\":null,\"created_by\":null,\"created_on\":\"2026-08-11T20:29:00.18279Z\",\"districts_relation\":null,\"email\":\"crackers.biscuits@gmail.com\",\"id\":\"19ff1031a11c0c013f60044f56\",\"is_active\":true,\"merchant_id\":null,\"merchant_relation\":null,\"merchants_relation\":null,\"nick_name\":\"Super Admin\",\"postal_codes_relation\":null,\"provinces_relation\":null,\"subdistricts_relation\":null,\"updated_by\":null,\"updated_on\":\"2026-08-11T20:29:00.18279Z\",\"users_role_id\":\"19fe813c54d12bf48f1d7c710e\",\"users_role_relation\":{\"created_by\":null,\"created_on\":\"2026-08-10T02:50:37.639811Z\",\"id\":\"19fe813c54d12bf48f1d7c710e\",\"merchant_id\":null,\"merchant_relation\":{\"active\":null,\"additional_information\":null,\"address\":null,\"city_id\":null,\"city_relation\":null,\"citys_relation\":null,\"created_by\":null,\"created_by_relation\":null,\"created_on\":null,\"district_id\":null,\"district_relation\":null,\"districts_relation\":null,\"email\":null,\"id\":\"\",\"modas_relation\":null,\"name\":null,\"package_types_relation\":null,\"postal_code\":null,\"postal_codes_relation\":null,\"province_id\":null,\"province_relation\":null,\"provinces_relation\":null,\"subdistrict_id\":null,\"subdistrict_relation\":null,\"subdistricts_relation\":null,\"telp\":null,\"updated_by\":null,\"updated_on\":null,\"users_roless_relation\":null,\"userss_relation\":null},\"name\":\"Super Admin\",\"role_key\":\"SPM\",\"updated_by\":null,\"updated_on\":\"2026-08-10T02:50:37.639811Z\",\"userss_relation\":null}}"} +{"level":"info","ts":"2026-08-17T12:58:11.056+0700","caller":"handlers/handlers.go:66","msg":"Request Success","status":200,"method":"POST","path":"/master-data/provinces/list","query":"","ip":"127.0.0.1","latency":0.068178375,"user-agent":"Apidog/1.0.0 (https://apidog.com)"} diff --git a/storage/logs/db.log b/storage/logs/db.log index 58dbafe..d777fd5 100644 --- a/storage/logs/db.log +++ b/storage/logs/db.log @@ -3130,3 +3130,114 @@ {"level":"info","ts":"2026-08-16T17:36:57.409+0700","caller":"database/redis.go:34","msg":"Parse config master"} {"level":"info","ts":"2026-08-16T17:36:57.409+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} {"level":"info","ts":"2026-08-16T17:36:57.677+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:29:30.370+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:29:30.370+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:29:30.424+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:29:30.424+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:29:30.424+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:29:30.505+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:34:05.228+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:34:05.229+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:34:05.282+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:34:05.282+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:34:05.282+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:34:05.340+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:37:41.035+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:37:41.036+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:37:41.098+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:37:41.098+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:37:41.098+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:37:41.181+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:38:53.641+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:38:53.641+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:38:53.726+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:38:53.726+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:38:53.726+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:38:53.782+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:39:08.212+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/auth.go:29","elapsed":0.03048775,"rows":1,"sql":"SELECT * FROM \"users_roles\" WHERE \"users_roles\".\"id\" = '19fe813c54d12bf48f1d7c710e'"} +{"level":"info","ts":"2026-08-17T10:39:08.213+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/auth.go:29","elapsed":0.108979542,"rows":1,"sql":"SELECT * FROM \"users\" WHERE email='crackers.biscuits@gmail.com'"} +{"level":"info","ts":"2026-08-17T10:41:52.730+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:41:52.731+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:41:52.988+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:41:52.988+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:41:52.988+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:41:53.044+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:42:13.143+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:42:13.143+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:42:13.229+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:42:13.229+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:42:13.229+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:42:13.293+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:42:37.758+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:42:37.758+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:42:37.810+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:42:37.810+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:42:37.810+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:42:37.860+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:43:07.874+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T10:43:07.874+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T10:43:07.928+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:43:07.928+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T10:43:07.928+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T10:43:08.037+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T10:43:24.148+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/province.go:79","elapsed":0.097699667,"rows":0,"sql":"SELECT * FROM \"province\" WHERE id = 'ist' ORDER BY \"province\".\"id\" LIMIT 1"} +{"level":"info","ts":"2026-08-17T12:03:30.321+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:03:30.322+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:03:30.372+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:03:30.372+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:03:30.372+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:03:30.422+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:03:47.835+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/auth.go:29","elapsed":0.025135584,"rows":1,"sql":"SELECT * FROM \"users_roles\" WHERE \"users_roles\".\"id\" = '19fe813c54d12bf48f1d7c710e'"} +{"level":"info","ts":"2026-08-17T12:03:47.836+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/auth.go:29","elapsed":0.13246675,"rows":1,"sql":"SELECT * FROM \"users\" WHERE email='crackers.biscuits@gmail.com'"} +{"level":"info","ts":"2026-08-17T12:03:52.269+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/internal/usecases/province.go:62","elapsed":0.051776792,"rows":0,"sql":"SELECT * FROM \"province\" WHERE id = 'ist' ORDER BY \"province\".\"id\" LIMIT 1"} +{"level":"info","ts":"2026-08-17T12:42:48.793+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:42:48.793+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:42:48.846+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:42:48.846+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:42:48.846+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:42:48.921+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:47:49.764+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:47:49.765+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:47:49.827+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:47:49.827+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:47:49.827+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:47:49.891+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"error","ts":"2026-08-17T12:48:01.719+0700","caller":"logger/database.go:82","msg":"[GORM] query error","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:50","elapsed":0.030638916,"rows":-1,"sql":"SELECT * FROM \"","error":"ERROR: unterminated quoted identifier at or near \"\"\" (SQLSTATE 42601)"} +{"level":"info","ts":"2026-08-17T12:52:31.002+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:52:31.002+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:52:31.163+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:52:31.163+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:52:31.163+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:52:31.218+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:52:47.866+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:52:47.867+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:52:47.917+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:52:47.917+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:52:47.918+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:52:47.971+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"error","ts":"2026-08-17T12:52:50.278+0700","caller":"logger/database.go:82","msg":"[GORM] query error","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:29","elapsed":0.033337958,"rows":0,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON perovince.merchant_id=merchant.id","error":"ERROR: missing FROM-clause entry for table \"perovince\" (SQLSTATE 42P01)"} +{"level":"error","ts":"2026-08-17T12:52:50.278+0700","caller":"logger/database.go:82","msg":"[GORM] query error","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:53","elapsed":0.000004042,"rows":0,"sql":"","error":"ERROR: missing FROM-clause entry for table \"perovince\" (SQLSTATE 42P01)"} +{"level":"info","ts":"2026-08-17T12:53:52.675+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:53:52.676+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:53:52.753+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:53:52.753+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:53:52.754+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:53:52.818+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:53:54.696+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:29","elapsed":0.060158792,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:53:54.707+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:45","elapsed":0.01037275,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:53:54.734+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:53","elapsed":0.027525958,"rows":10,"sql":"SELECT merchant.id,merchant_id FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id LIMIT 10"} +{"level":"info","ts":"2026-08-17T12:57:37.946+0700","caller":"database/redis.go:34","msg":"Parse config master"} +{"level":"info","ts":"2026-08-17T12:57:37.947+0700","caller":"database/redis.go:49","msg":"Connecting to Redis master"} +{"level":"info","ts":"2026-08-17T12:57:38.002+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:57:38.009+0700","caller":"database/redis.go:34","msg":"Parse config slave"} +{"level":"info","ts":"2026-08-17T12:57:38.009+0700","caller":"database/redis.go:49","msg":"Connecting to Redis slave"} +{"level":"info","ts":"2026-08-17T12:57:38.066+0700","caller":"database/redis.go:62","msg":"Connected"} +{"level":"info","ts":"2026-08-17T12:57:43.014+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:29","elapsed":0.048680833,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:57:43.028+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:47","elapsed":0.013685875,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:57:43.053+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:55","elapsed":0.024657333,"rows":10,"sql":"SELECT province.name AS name,merchant.id AS merchant_id FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id LIMIT 10"} +{"level":"info","ts":"2026-08-17T12:58:05.807+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:29","elapsed":0.023964792,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:58:05.837+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:47","elapsed":0.029435417,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id WHERE province.name::TEXT ILIKE '%kalimantan%' OR merchant.id::TEXT ILIKE '%kalimantan%'"} +{"level":"info","ts":"2026-08-17T12:58:05.861+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:55","elapsed":0.024195791,"rows":5,"sql":"SELECT province.name AS name,merchant.id AS merchant_id FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id WHERE province.name::TEXT ILIKE '%kalimantan%' OR merchant.id::TEXT ILIKE '%kalimantan%' LIMIT 10"} +{"level":"info","ts":"2026-08-17T12:58:11.033+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:29","elapsed":0.020841792,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:58:11.044+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:47","elapsed":0.009482709,"rows":1,"sql":"SELECT count(*) FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id"} +{"level":"info","ts":"2026-08-17T12:58:11.056+0700","caller":"logger/database.go:90","msg":"[GORM] query execution","line":"/Users/teguh/Documents/project/cargo/cargo-erp-deploy/app/backend/pkg/datatable/datatable.go:55","elapsed":0.011322792,"rows":10,"sql":"SELECT province.name AS name,merchant.id AS merchant_id FROM \"province\" LEFT JOIN merchant ON province.merchant_id=merchant.id LIMIT 10"}