func (ltc *LocationTypeCreate) Save(ctx context.Context) (*LocationType, error) {
	if ltc.create_time == nil {
		v := locationtype.DefaultCreateTime()
		ltc.create_time = &v
	}
	if ltc.update_time == nil {
		v := locationtype.DefaultUpdateTime()
		ltc.update_time = &v
	}
	if ltc.site == nil {
		v := locationtype.DefaultSite
		ltc.site = &v
	}
	if ltc.name == nil {
		return nil, errors.New("ent: missing required field \"name\"")
	}
	if ltc.map_zoom_level == nil {
		v := locationtype.DefaultMapZoomLevel
		ltc.map_zoom_level = &v
	}
	if ltc.index == nil {
		v := locationtype.DefaultIndex
		ltc.index = &v
	}
	return ltc.sqlSave(ctx)
}
// Save creates the LocationType in the database.
Save creates the LocationType in the database.
// Save creates the LocationType in the database .
func (ltc *LocationTypeCreate) Save(ctx context.Context) (*LocationType, error) {
	if ltc.create_time == nil {
		v := locationtype.DefaultCreateTime()
		ltc.create_time = &v
	}
	if ltc.update_time == nil {
		v := locationtype.DefaultUpdateTime()
		ltc.update_time = &v
	}
	if ltc.site == nil {
		v := locationtype.DefaultSite
		ltc.site = &v
	}
	if ltc.name == nil {
		return nil, errors.New("ent: missing required field \"name\"")
	}
	if ltc.map_zoom_level == nil {
		v := locationtype.DefaultMapZoomLevel
		ltc.map_zoom_level = &v
	}
	if ltc.index == nil {
		v := locationtype.DefaultIndex
		ltc.index = &v
	}
	return ltc.sqlSave(ctx)
}
func ( ltc * LocationTypeCreate ) Save ( ctx context . Context ) ( * LocationType , error ) { if ltc . create_time == nil { v := locationtype . DefaultCreateTime ( ) ltc . create_time = & v } if ltc . update_time == nil { v := locationtype . DefaultUpdateTime ( ) ltc . update_time = & v } if ltc . site == nil { v := locationtype . DefaultSite ltc . site = & v } if ltc . name == nil { return nil , errors . New ( " \" \" " ) } if ltc . map_zoom_level == nil { v := locationtype . DefaultMapZoomLevel ltc . map_zoom_level = & v } if ltc . index == nil { v := locationtype . DefaultIndex ltc . index = & v } return ltc . sqlSave ( ctx ) }
Save creates the LocationType in the database.
Save creates the LocationType in the database .