package entities import ( "time" "gorm.io/gorm" ) type Customer struct { Id uint `gorm:"primaryKey"` Name string `gorm:"not null"` PicId uint `gorm:"not null"` Type string `gorm:"not null"` Address string `gorm:"not null"` Phone string `gorm:"not null"` Email string `gorm:"not null"` AccountNumber string `gorm:"not null"` Balance float64 `gorm:"default:0"` CreatedBy uint `gorm:"not null"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"` Pic User `gorm:"foreignKey:PicId;references:Id"` }