forked from yoone/API
28 lines
760 B
TypeScript
28 lines
760 B
TypeScript
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
||
|
||
@Entity('site')
|
||
export class Site {
|
||
@PrimaryGeneratedColumn({ type: 'int' })
|
||
id: number;
|
||
|
||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||
apiUrl: string;
|
||
|
||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||
consumerKey: string;
|
||
|
||
@Column({ type: 'varchar', length: 255, nullable: true })
|
||
consumerSecret: string;
|
||
|
||
@Column({ type: 'varchar', length: 255, unique: true })
|
||
siteName: string;
|
||
|
||
@Column({ type: 'varchar', length: 32, default: 'woocommerce' })
|
||
type: string; // 平台类型:woocommerce | shopyy
|
||
|
||
@Column({ type: 'varchar', length: 64, nullable: true })
|
||
skuPrefix: string;
|
||
|
||
@Column({ type: 'tinyint', default: 0 })
|
||
isDisabled: number;
|
||
} |