forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.entity.ts
More file actions
52 lines (41 loc) · 1.31 KB
/
Copy pathprofile.entity.ts
File metadata and controls
52 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import {
Entity,
PrimaryColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';
export enum DefaultSplitType {
EQUAL = 'equal',
ITEMIZED = 'itemized',
PERCENTAGE = 'percentage',
CUSTOM = 'custom',
}
@Entity('user_profiles')
export class UserProfile {
@PrimaryColumn({ type: 'varchar', length: 56, name: 'wallet_address' })
walletAddress!: string;
@Column({ type: 'varchar', length: 255, nullable: true, name: 'display_name' })
displayName!: string | null;
@Column({ type: 'varchar', length: 255, nullable: true, name: 'email' })
email!: string | null;
@Column({ type: 'varchar', length: 2048, nullable: true, name: 'avatar_url' })
avatarUrl!: string | null;
@Column({ type: 'varchar', length: 10, default: 'USD', name: 'preferred_currency' })
preferredCurrency!: string;
@Column({
type: 'varchar',
length: 20,
default: DefaultSplitType.EQUAL,
name: 'default_split_type',
})
defaultSplitType!: DefaultSplitType;
@Column({ type: 'boolean', default: true, name: 'email_notifications' })
emailNotifications!: boolean;
@Column({ type: 'boolean', default: true, name: 'push_notifications' })
pushNotifications!: boolean;
@CreateDateColumn({ name: 'created_at' })
createdAt!: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt!: Date;
}