Przeglądaj źródła

Ajout de l'Uid pour les models existants

Vincent GUFFON 4 lat temu
rodzic
commit
3c42bb1387

+ 2 - 2
models/Access/MyProfile.ts

@@ -1,10 +1,10 @@
-import { Attr, Num, Model } from '@vuex-orm/core'
+import {Attr, Num, Model, Uid} from '@vuex-orm/core'
 import { Historical } from '~/types/interfaces'
 
 export class MyProfile extends Model {
   static entity = 'accesses'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Num(0, { nullable: true })

+ 2 - 2
models/Access/PersonalizedList.ts

@@ -1,9 +1,9 @@
-import { Attr, Model, Str } from '@vuex-orm/core'
+import {Model, Str, Uid} from '@vuex-orm/core'
 
 export class PersonalizedList extends Model {
   static entity = 'personalized_lists'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('')

+ 2 - 2
models/Core/AddressPostal.ts

@@ -1,10 +1,10 @@
-import { Attr, Str, HasOne, Num, Model } from '@vuex-orm/core'
+import {Str, HasOne, Num, Model, Uid} from '@vuex-orm/core'
 import { Country } from '~/models/Core/Country'
 
 export class AddressPostal extends Model {
   static entity = 'address_postals'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @HasOne(() => Country, 'id')

+ 2 - 2
models/Core/BankAccount.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Bool, Model } from '@vuex-orm/core'
+import {Str, Bool, Model, Uid} from '@vuex-orm/core'
 
 export class BankAccount extends Model {
   static entity = 'bank_accounts'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('', { nullable: true })

+ 2 - 2
models/Core/ContactPoint.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Model } from '@vuex-orm/core'
+import {Str, Model, Uid} from '@vuex-orm/core'
 
 export class ContactPoint extends Model {
   static entity = 'contact_points'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('PRINCIPAL', { nullable: false })

+ 2 - 2
models/Core/Country.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Model } from '@vuex-orm/core'
+import {Str, Model, Uid} from '@vuex-orm/core'
 
 export class Country extends Model {
   static entity = 'countries'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('')

+ 2 - 2
models/Organization/Organization.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Bool, Num, Model } from '@vuex-orm/core'
+import {Attr, Str, Bool, Num, Model, Uid} from '@vuex-orm/core'
 
 export class Organization extends Model {
   static entity = 'organizations'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Attr({})

+ 2 - 2
models/Organization/OrganizationAddressPostal.ts

@@ -1,10 +1,10 @@
-import { Attr, Str, HasOne, Model } from '@vuex-orm/core'
+import {Str, HasOne, Model, Uid} from '@vuex-orm/core'
 import { AddressPostal } from '~/models/Core/AddressPostal'
 
 export class OrganizationAddressPostal extends Model {
   static entity = 'organization_address_postals'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @HasOne(() => AddressPostal, 'id')

+ 2 - 2
models/Organization/OrganizationLicence.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Model } from '@vuex-orm/core'
+import {Str, Model, Uid} from '@vuex-orm/core'
 
 export class OrganizationLicence extends Model {
   static entity = 'organization_licences'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('', { nullable: false })

+ 2 - 2
models/Organization/OrganizationNetwork.ts

@@ -1,9 +1,9 @@
-import { Attr, Str, Model } from '@vuex-orm/core'
+import {Str, Model, Uid} from '@vuex-orm/core'
 
 export class OrganizationLicence extends Model {
   static entity = 'organization_licences'
 
-  @Attr(null)
+  @Uid()
   id!: number | null
 
   @Str('', { nullable: false })