import { Column, Entity } from 'typeorm';
import { BaseModel } from '../../frame/BaseModel';
import * as dayjs from 'dayjs';
// 企业
@Entity('company')
export class Company extends BaseModel {
  @Column({ type: 'integer', nullable: true, comment: '平台用户id' })
  user: number;
  @Column({ type: 'character varying', nullable: true, comment: '所属产业' })
  industry: string;
  @Column({ type: 'jsonb', nullable: true, comment: '标签' })
  tags: Array<any>;
  @Column({ type: 'character varying', nullable: true, comment: '企业名称' })
  name: string;
  @Column({ type: 'jsonb', nullable: true, comment: 'logo' })
  logo: Array<any>;
  @Column({ type: 'character varying', nullable: true, comment: '企业统一信用代码名称' })
  code: string;
  @Column({ type: 'character varying', nullable: true, comment: '企业类型' })
  pattern: string;
  @Column({ type: 'character varying', nullable: true, comment: '企业规模' })
  scale: string;
  @Column({ type: 'character varying', nullable: true, comment: '联系电话' })
  phone: string;
  @Column({ type: 'character varying', nullable: true, comment: '所属行业' })
  type: string;
  @Column({ type: 'jsonb', nullable: true, comment: '所在地区' })
  area: Array<any>;
  @Column({ type: 'character varying', nullable: true, comment: '法定代表人' })
  representative: string;
  @Column({ type: 'character varying', nullable: true, comment: '电子邮箱' })
  email: string;
  @Column({ type: 'integer', nullable: true, comment: '员工人数' })
  person: number;
  @Column({ type: 'character varying', nullable: true, comment: '简介' })
  register: string;
  @Column({ type: 'timestamp without time zone', nullable: true, comment: '成立日期', transformer: { from: value => dayjs(value).format('YYYY-MM-DD HH:mm:ss'), to: value => value } })
  create_time: Date;
  @Column({ type: 'character varying', nullable: true, comment: '地址' })
  address: string;
  @Column({ type: 'text', nullable: true, comment: '简介' })
  brief: string;
  @Column({ type: 'character varying', nullable: true, comment: '是否公开' })
  is_show: string;
  @Column({ type: 'character varying', default: '0', comment: '公司状态' })
  companyStatus: string;
  @Column({ type: 'character varying', default: '0', comment: '状态' })
  status: string;

  @Column({ type: 'character varying', nullable: true, comment: '产品' })
  products: string;
}
