24 lines
749 B
Go
24 lines
749 B
Go
package entities
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
type MVendorEntity struct {
|
|
ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()" json:"id"`
|
|
SearchKey string `gorm:"type:varchar(255);index;"`
|
|
Name string `gorm:"type:varchar(100);not null;"`
|
|
Address string `gorm:"type:text"`
|
|
ContactPerson string `gorm:"type:varchar(100);"`
|
|
IsActive bool `gorm:"type:boolean;default:true"`
|
|
|
|
ClientID uuid.UUID `gorm:"type:uuid;index;"`
|
|
|
|
Client M_Client `gorm:"foreignKey:ClientID;references:ID"`
|
|
CrossReferences []MCrossReferenceEntity `gorm:"foreignKey:VendorID;references:ID"`
|
|
|
|
FullAuditTrail
|
|
}
|
|
|
|
func (MVendorEntity) TableName() string {
|
|
return "m_vendors"
|
|
}
|