import { Model } from 'sequelize'
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm'

export enum ApiType {
    Customer = 1,
    Enterprise = 2
}
@Entity()
export class ApiUser {
    @PrimaryGeneratedColumn()
    id: number

    @Column()
    userId: number

    @Column({ nullable: true })
    name: string

    @Column()
    avatar: string

    @Column()
    desc: string

    @Column()
    logo: string

    @Column()
    company: string

    @Column({ nullable: true })
    code: string

    @Column({ nullable: true })
    publicCode: string

    @Column({ type: 'enum', enum: ApiType })
    type: ApiType

    @CreateDateColumn()
    createdAt: Date
}
