2024-03-20 09:09:42 +07:00
|
|
|
import { Entity, Column, OneToMany } from "typeorm";
|
2024-02-02 10:47:19 +07:00
|
|
|
import { EntityBase } from "./base/Base";
|
|
|
|
|
|
2024-03-20 09:09:42 +07:00
|
|
|
import { ProfileInformation } from "./ProfileInformation";
|
|
|
|
|
|
2024-02-02 10:47:19 +07:00
|
|
|
@Entity("gender")
|
|
|
|
|
export class Gender extends EntityBase {
|
|
|
|
|
@Column({
|
|
|
|
|
nullable: true,
|
|
|
|
|
comment: "เพศ",
|
|
|
|
|
length: 255,
|
|
|
|
|
default: null,
|
|
|
|
|
})
|
|
|
|
|
name: string;
|
2024-03-20 09:09:42 +07:00
|
|
|
|
|
|
|
|
@OneToMany(() => ProfileInformation, (profileInformation) => profileInformation.genderId)
|
|
|
|
|
profileInformations: ProfileInformation[];
|
2024-02-02 10:47:19 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class CreateGender {
|
|
|
|
|
@Column()
|
2024-02-02 14:27:39 +07:00
|
|
|
name: string;
|
2024-02-02 10:47:19 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type UpdateGender = Partial<CreateGender>;
|