func (epc *EquipmentPortCreate) Save(ctx context.Context) (*EquipmentPort, error) {
	if epc.create_time == nil {
		v := equipmentport.DefaultCreateTime()
		epc.create_time = &v
	}
	if epc.update_time == nil {
		v := equipmentport.DefaultUpdateTime()
		epc.update_time = &v
	}
	if len(epc.definition) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"definition\"")
	}
	if epc.definition == nil {
		return nil, errors.New("ent: missing required edge \"definition\"")
	}
	if len(epc.parent) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"parent\"")
	}
	if len(epc.link) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"link\"")
	}
	return epc.sqlSave(ctx)
}
// Save creates the EquipmentPort in the database.
Save creates the EquipmentPort in the database.
// Save creates the EquipmentPort in the database .
func (epc *EquipmentPortCreate) Save(ctx context.Context) (*EquipmentPort, error) {
	if epc.create_time == nil {
		v := equipmentport.DefaultCreateTime()
		epc.create_time = &v
	}
	if epc.update_time == nil {
		v := equipmentport.DefaultUpdateTime()
		epc.update_time = &v
	}
	if len(epc.definition) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"definition\"")
	}
	if epc.definition == nil {
		return nil, errors.New("ent: missing required edge \"definition\"")
	}
	if len(epc.parent) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"parent\"")
	}
	if len(epc.link) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"link\"")
	}
	return epc.sqlSave(ctx)
}
func ( epc * EquipmentPortCreate ) Save ( ctx context . Context ) ( * EquipmentPort , error ) { if epc . create_time == nil { v := equipmentport . DefaultCreateTime ( ) epc . create_time = & v } if epc . update_time == nil { v := equipmentport . DefaultUpdateTime ( ) epc . update_time = & v } if len ( epc . definition ) > 1 { return nil , errors . New ( " \" \" " ) } if epc . definition == nil { return nil , errors . New ( " \" \" " ) } if len ( epc . parent ) > 1 { return nil , errors . New ( " \" \" " ) } if len ( epc . link ) > 1 { return nil , errors . New ( " \" \" " ) } return epc . sqlSave ( ctx ) }
Save creates the EquipmentPort in the database.
Save creates the EquipmentPort in the database .