浏览代码

minor fix sur les models

Vincent GUFFON 4 年之前
父节点
当前提交
f8c4550f2c

+ 1 - 1
models/Access/MyProfile.ts

@@ -5,7 +5,7 @@ export class MyProfile extends Model {
   static entity = 'accesses'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Num(0, { nullable: true })
   activityYear!: number

+ 1 - 1
models/Access/PersonalizedList.ts

@@ -4,7 +4,7 @@ export class PersonalizedList extends Model {
   static entity = 'personalized_lists'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('')
   label!:string|null

+ 2 - 2
models/Core/AddressPostal.ts

@@ -4,7 +4,7 @@ export class AddressPostal extends Model {
   static entity = 'address_postals'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: true })
   '@id'!: string
@@ -12,7 +12,7 @@ export class AddressPostal extends Model {
   @Attr(null)
   organizationAddressPostalId!: number | null
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   addressCountry!: string
 
   @Str('', { nullable: true })

+ 1 - 1
models/Core/BankAccount.ts

@@ -4,7 +4,7 @@ export class BankAccount extends Model {
   static entity = 'bank_accounts'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: true })
   bankName!: string

+ 13 - 10
models/Core/ContactPoint.ts

@@ -1,35 +1,38 @@
-import {Str, Model, Uid} from '@vuex-orm/core'
+import {Str, Model, Uid, Attr} from '@vuex-orm/core'
 
 export class ContactPoint extends Model {
   static entity = 'contact_points'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('PRINCIPAL', { nullable: false })
   contactType!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   email!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   emailInvalid!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   telphone!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   telphoneInvalid!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   mobilPhone!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   mobilPhoneInvalid!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   faxNumber!: string
 
-  @Str('', { nullable: true })
+  @Str(null, { nullable: true })
   faxNumberInvalid!: string
+
+  @Attr([])
+  organization!: []
 }

+ 1 - 1
models/Core/Country.ts

@@ -4,7 +4,7 @@ export class Country extends Model {
   static entity = 'countries'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('')
   name!: string

+ 1 - 1
models/Core/Notification.ts

@@ -5,7 +5,7 @@ export class Notification extends Model {
   static entity = 'notifications'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: true })
   name!: string

+ 1 - 1
models/Core/NotificationMessage.ts

@@ -4,7 +4,7 @@ export class NotificationMessage extends Model {
   static entity = 'notification_messages'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: true })
   about!: string

+ 1 - 1
models/Core/NotificationUsers.ts

@@ -4,7 +4,7 @@ export class NotificationUsers extends Model {
   static entity = 'notification_users'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: true })
   notification!: string

+ 1 - 1
models/Organization/Organization.ts

@@ -4,7 +4,7 @@ export class Organization extends Model {
   static entity = 'organizations'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Attr({})
   originalState!: object | null

+ 2 - 2
models/Organization/OrganizationAddressPostal.ts

@@ -5,11 +5,11 @@ export class OrganizationAddressPostal extends Model {
   static entity = 'organization_address_postals'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @HasOne(() => AddressPostal, 'organizationAddressPostalId')
   addressPostal!: AddressPostal | null
 
-  @Str('PRINCIPAL', { nullable: false })
+  @Str('ADDRESS_HEAD_OFFICE', { nullable: false })
   type!: string
 }

+ 0 - 16
models/Organization/OrganizationContactPoint.ts

@@ -1,16 +0,0 @@
-import { Attr, Str, HasOne, Model } from '@vuex-orm/core'
-import { AddressPostal } from '~/models/Core/AddressPostal'
-import { ContactPoint } from '~/models/Core/ContactPoint'
-
-export class OrganizationAddressPostal extends Model {
-  static entity = 'organization_contact_points'
-
-  @Attr(null)
-  id!: number | null
-
-  @HasOne(() => ContactPoint, 'id')
-  contactPoint!: ContactPoint | null
-
-  @Str('PRINCIPAL', { nullable: false })
-  type!: string
-}

+ 1 - 1
models/Organization/OrganizationLicence.ts

@@ -4,7 +4,7 @@ export class OrganizationLicence extends Model {
   static entity = 'organization_licences'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: false })
   licensee!: string

+ 1 - 1
models/Organization/OrganizationNetwork.ts

@@ -4,7 +4,7 @@ export class OrganizationLicence extends Model {
   static entity = 'organization_licences'
 
   @Uid()
-  id!: number | null
+  id!: number | string | null
 
   @Str('', { nullable: false })
   licensee!: string