add
wangpengfei
2023-07-12 a32c022b30a30982358464ba0f68aab0b2a103c2
logs/aps-admin.err.log
@@ -345,3 +345,4 @@
[2023-07-11 11:33:55]   [error]   [gorm.io/gorm/migrator.Migrator.AutoMigrate:104]   failed to parse value model.SubOrder{Id:0, ClientId:0, MemberId:0, MasterOrderId:0, Number:"", ProductOrder:model.ProductOrder{Id:0, Products:[]model.Product(nil)}, Model:gorm.Model{ID:0x0, CreatedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), UpdatedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletedAt:gorm.DeletedAt{Time:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Valid:false}}}, got error invalid field found for struct aps_crm/model.SubOrder's field ProductOrder: define a valid foreign key for relations or implement the Valuer/Scanner interface
[2023-07-11 11:33:55]   [error]   [gorm.io/gorm/migrator.Migrator.CreateTable:198]   failed to parse value model.SubOrder{Id:0, ClientId:0, MemberId:0, MasterOrderId:0, Number:"", ProductOrder:model.ProductOrder{Id:0, Products:[]model.Product(nil)}, Model:gorm.Model{ID:0x0, CreatedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), UpdatedAt:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletedAt:gorm.DeletedAt{Time:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Valid:false}}}, got error invalid field found for struct aps_crm/model.SubOrder's field ProductOrder: define a valid foreign key for relations or implement the Valuer/Scanner interface
[2023-07-11 11:33:55]   [error]   [main.main:29]   model Init err:invalid field found for struct aps_crm/model.SubOrder's field ProductOrder: define a valid foreign key for relations or implement the Valuer/Scanner interface
[2023-07-12 15:23:10]   [error]   [aps_crm/model.(*ContractSearch).Create:46]   trace   {"error": "Error 1146 (42S02): Table 'aps_crm.contract' doesn't exist", "elapsed": 0.003547, "rows": 0, "sql": "INSERT INTO `contract` (`client_id`,`member_id`,`number`,`quotation_id`,`status_id`,`file`) VALUES (11,11,'ZDYB02-2',0,0,'string')"}