import { BaseEntity } from '../../base/entity/base';
import { Column, Entity, Index } from 'typeorm';

/**
 * 购买方信息
 */
@Entity('t_basicdata_buyer')
export class BasicdataBuyerEntity extends BaseEntity {
  @Index()
  @Column({ comment: '部门ID', type: 'bigint', nullable: true })
  departmentId: number;

  departmentName: string;

  @Index({ unique: true })
  @Column({ comment: '代码', length: 50 })
  code: string;

  @Column({ comment: '名称', length: 200 })
  name: string;

  @Column({ comment: '地址', length: 255, nullable: true })
  address: string;

  @Column({ comment: '联系人', length: 50, nullable: true })
  contact: string;

  @Column({ comment: '联系电话', length: 50, nullable: true })
  phone: string;

  @Column({ comment: '备注', type: 'text', nullable: true })
  remark: string;
}