func (epdc *EquipmentPositionDefinitionCreate) Save(ctx context.Context) (*EquipmentPositionDefinition, error) {
	if epdc.create_time == nil {
		v := equipmentpositiondefinition.DefaultCreateTime()
		epdc.create_time = &v
	}
	if epdc.update_time == nil {
		v := equipmentpositiondefinition.DefaultUpdateTime()
		epdc.update_time = &v
	}
	if epdc.name == nil {
		return nil, errors.New("ent: missing required field \"name\"")
	}
	if len(epdc.equipment_type) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"equipment_type\"")
	}
	return epdc.sqlSave(ctx)
}
// Save creates the EquipmentPositionDefinition in the database.
Save creates the EquipmentPositionDefinition in the database.
// Save creates the EquipmentPositionDefinition in the database .
func (epdc *EquipmentPositionDefinitionCreate) Save(ctx context.Context) (*EquipmentPositionDefinition, error) {
	if epdc.create_time == nil {
		v := equipmentpositiondefinition.DefaultCreateTime()
		epdc.create_time = &v
	}
	if epdc.update_time == nil {
		v := equipmentpositiondefinition.DefaultUpdateTime()
		epdc.update_time = &v
	}
	if epdc.name == nil {
		return nil, errors.New("ent: missing required field \"name\"")
	}
	if len(epdc.equipment_type) > 1 {
		return nil, errors.New("ent: multiple assignments on a unique edge \"equipment_type\"")
	}
	return epdc.sqlSave(ctx)
}
func ( epdc * EquipmentPositionDefinitionCreate ) Save ( ctx context . Context ) ( * EquipmentPositionDefinition , error ) { if epdc . create_time == nil { v := equipmentpositiondefinition . DefaultCreateTime ( ) epdc . create_time = & v } if epdc . update_time == nil { v := equipmentpositiondefinition . DefaultUpdateTime ( ) epdc . update_time = & v } if epdc . name == nil { return nil , errors . New ( " \" \" " ) } if len ( epdc . equipment_type ) > 1 { return nil , errors . New ( " \" \" " ) } return epdc . sqlSave ( ctx ) }
Save creates the EquipmentPositionDefinition in the database.
Save creates the EquipmentPositionDefinition in the database .