33
33
* @property int $ch_vil_paysID
34
34
* @property int $ch_vil_user
35
35
* @property string $ch_vil_label
36
+ * @property int|null $subdivision_id
36
37
* @property Carbon|null $ch_vil_date_enregistrement
37
38
* @property Carbon|null $ch_vil_mis_jour
38
39
* @property int|null $ch_vil_nb_update
83
84
* @method static Builder|Ville whereChVilHeader($value)
84
85
* @method static Builder|Ville whereChVilID($value)
85
86
* @method static Builder|Ville whereChVilLabel($value)
87
+ * @method static Builder|Ville whereSubdivisionId($value)
86
88
* @method static Builder|Ville whereChVilLegendeImg1($value)
87
89
* @method static Builder|Ville whereChVilLegendeImg2($value)
88
90
* @method static Builder|Ville whereChVilLegendeImg3($value)
@@ -120,6 +122,7 @@ class Ville extends Model implements Searchable, Infrastructurable, Resourceable
120
122
protected $ casts = [
121
123
'ch_vil_paysID ' => 'int ' ,
122
124
'ch_vil_user ' => 'int ' ,
125
+ 'subdivision_id ' => 'int ' ,
123
126
'ch_vil_nb_update ' => 'int ' ,
124
127
'ch_vil_coord_X ' => 'float ' ,
125
128
'ch_vil_coord_Y ' => 'float ' ,
@@ -136,6 +139,7 @@ class Ville extends Model implements Searchable, Infrastructurable, Resourceable
136
139
'ch_vil_paysID ' ,
137
140
'ch_vil_user ' ,
138
141
'ch_vil_label ' ,
142
+ 'subdivision_id ' ,
139
143
'ch_vil_date_enregistrement ' ,
140
144
'ch_vil_mis_jour ' ,
141
145
'ch_vil_nb_update ' ,
@@ -169,6 +173,7 @@ class Ville extends Model implements Searchable, Infrastructurable, Resourceable
169
173
'ch_vil_paysID ' ,
170
174
'ch_vil_user ' ,
171
175
'ch_vil_label ' ,
176
+ 'subdivision_id ' ,
172
177
'ch_vil_date_enregistrement ' ,
173
178
'ch_vil_mis_jour ' ,
174
179
'ch_vil_nb_update ' ,
@@ -216,6 +221,14 @@ public function patrimoines(): HasMany
216
221
return $ this ->hasMany (Patrimoine::class, 'ch_pat_villeID ' );
217
222
}
218
223
224
+ /**
225
+ * @return BelongsTo
226
+ */
227
+ public function subdivision (): BelongsTo
228
+ {
229
+ return $ this ->belongsTo (Subdivision::class, 'subdivision_id ' );
230
+ }
231
+
219
232
/**
220
233
* @return Collection<int, CustomUser>
221
234
*/
0 commit comments