返回 AiToEarn
accountGroup.ts
根目录 / project / aitoearn-electron / electron / db / models / accountGroup.ts
1 import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2 import { TempModel } from './temp';
3
4 /**
5 * 账户组
6 * 与账户表关联
7 */
8 @Entity({ name: 'accountGroup' })
9 export class AccountGroupModel extends TempModel {
10 @PrimaryGeneratedColumn({ type: 'int', comment: 'id' })
11 id!: number;
12
13 @Column({
14 type: 'varchar',
15 nullable: false,
16 comment: '组名称',
17 })
18 name!: string;
19
20 @Column({
21 type: 'varchar',
22 nullable: true,
23 comment: '组代理IP',
24 })
25 proxyIp?: string;
26
27 @Column({
28 type: 'int',
29 nullable: false,
30 comment: '组排序',
31 default: 1,
32 })
33 rank!: number;
34
35 @Column({
36 type: 'boolean',
37 nullable: false,
38 comment: '是否启用代理',
39 default: true,
40 })
41 proxyOpen!: boolean;
42 }
43
43 lines TYPESCRIPT