Start to build edit member form
This commit is contained in:
88
geneit_app/src/api/MemberApi.ts
Normal file
88
geneit_app/src/api/MemberApi.ts
Normal file
@ -0,0 +1,88 @@
|
||||
export type Sex = "M" | "F";
|
||||
|
||||
export interface MemberApi {
|
||||
id: number;
|
||||
family_id: number;
|
||||
first_name?: string;
|
||||
last_name?: string;
|
||||
birth_last_name?: string;
|
||||
photo_id?: number;
|
||||
signed_photo_id?: number;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
address?: string;
|
||||
city?: string;
|
||||
postal_code?: string;
|
||||
country?: string;
|
||||
sex?: Sex;
|
||||
time_create?: number;
|
||||
time_update?: number;
|
||||
mother?: number;
|
||||
father?: number;
|
||||
birth_year?: number;
|
||||
birth_month?: number;
|
||||
birth_day?: number;
|
||||
dead: boolean;
|
||||
death_year?: number;
|
||||
death_month?: number;
|
||||
death_day?: number;
|
||||
note?: string;
|
||||
}
|
||||
|
||||
export class Member implements MemberApi {
|
||||
id: number;
|
||||
family_id: number;
|
||||
first_name?: string;
|
||||
last_name?: string;
|
||||
birth_last_name?: string;
|
||||
photo_id?: number;
|
||||
signed_photo_id?: number;
|
||||
email?: string;
|
||||
phone?: string;
|
||||
address?: string;
|
||||
city?: string;
|
||||
postal_code?: string;
|
||||
country?: string;
|
||||
sex?: Sex;
|
||||
time_create?: number;
|
||||
time_update?: number;
|
||||
mother?: number;
|
||||
father?: number;
|
||||
birth_year?: number;
|
||||
birth_month?: number;
|
||||
birth_day?: number;
|
||||
dead!: boolean;
|
||||
death_year?: number;
|
||||
death_month?: number;
|
||||
death_day?: number;
|
||||
note?: string;
|
||||
|
||||
constructor(m: MemberApi) {
|
||||
this.id = m.id;
|
||||
this.family_id = m.family_id;
|
||||
this.first_name = m.first_name;
|
||||
this.last_name = m.last_name;
|
||||
this.birth_last_name = m.birth_last_name;
|
||||
this.photo_id = m.photo_id;
|
||||
this.signed_photo_id = m.signed_photo_id;
|
||||
this.email = m.email;
|
||||
this.phone = m.phone;
|
||||
this.address = m.address;
|
||||
this.city = m.city;
|
||||
this.postal_code = m.postal_code;
|
||||
this.country = m.country;
|
||||
this.sex = m.sex;
|
||||
this.time_create = m.time_create;
|
||||
this.time_update = m.time_update;
|
||||
this.mother = m.mother;
|
||||
this.father = m.father;
|
||||
this.birth_year = m.birth_year;
|
||||
this.birth_month = m.birth_month;
|
||||
this.birth_day = m.birth_day;
|
||||
this.dead = m.dead;
|
||||
this.death_year = m.death_year;
|
||||
this.death_month = m.death_month;
|
||||
this.death_day = m.death_day;
|
||||
this.note = m.note;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user