import { Column, Entity, PrimaryColumn } from 'typeorm'; import { TimestampedEntity } from './timestamped.entity'; export enum OrganizationKind { COMPANY='COMPANY', UTE='UTE', PUBLIC_ENTITY='PUBLIC_ENTITY', OTHER='OTHER' } @Entity({ name: 'organization_profiles' }) export class OrganizationProfile extends TimestampedEntity { @PrimaryColumn({ name:'asset_id', type:'uuid' }) assetId!: string; @Column({ name:'organization_kind', type:'enum', enum:OrganizationKind, enumName:'organization_kind', default:OrganizationKind.COMPANY }) organizationKind!: OrganizationKind; @Column({ name:'legal_name', type:'varchar', length:240, nullable:true }) legalName!: string|null; @Column({ name:'tax_id', type:'varchar', length:32, nullable:true }) taxId!: string|null; @Column({ name:'notification_email', type:'varchar', length:320, nullable:true }) notificationEmail!: string|null; @Column({ type:'text', nullable:true }) notes!: string|null; @Column({ name:'updated_by', type:'uuid', nullable:true }) updatedBy!: string|null; }