dasdasdasdasda
This commit is contained in:
@@ -22,8 +22,10 @@ export interface IdentityAttributes {
|
||||
updatedAt?: Date;
|
||||
}
|
||||
|
||||
export interface IdentityCreationAttributes
|
||||
extends Optional<IdentityAttributes, "id" | "profilePhotoId"> {}
|
||||
export interface IdentityCreationAttributes extends Optional<
|
||||
IdentityAttributes,
|
||||
"id" | "profilePhotoId"
|
||||
> {}
|
||||
|
||||
export class Identity
|
||||
extends Model<IdentityAttributes, IdentityCreationAttributes>
|
||||
@@ -55,63 +57,64 @@ export class Identity
|
||||
id: {
|
||||
type: DataTypes.UUID,
|
||||
defaultValue: DataTypes.UUIDV4,
|
||||
primaryKey: true
|
||||
primaryKey: true,
|
||||
},
|
||||
|
||||
applicantId: {
|
||||
type: DataTypes.UUID,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
firstName: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
lastName: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
fatherName: {
|
||||
type: DataTypes.STRING
|
||||
type: DataTypes.STRING,
|
||||
},
|
||||
|
||||
nationalCode: {
|
||||
type: DataTypes.STRING(10),
|
||||
allowNull: false
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
birthDate: {
|
||||
type: DataTypes.DATEONLY
|
||||
type: DataTypes.DATEONLY,
|
||||
},
|
||||
|
||||
birthPlace: {
|
||||
type: DataTypes.STRING
|
||||
type: DataTypes.STRING,
|
||||
},
|
||||
|
||||
gender: {
|
||||
type: DataTypes.STRING
|
||||
type: DataTypes.ENUM("male", "female", "other"),
|
||||
allowNull: true,
|
||||
},
|
||||
|
||||
religion: {
|
||||
type: DataTypes.STRING
|
||||
type: DataTypes.STRING,
|
||||
},
|
||||
|
||||
nationality: {
|
||||
type: DataTypes.STRING
|
||||
type: DataTypes.STRING,
|
||||
},
|
||||
|
||||
profilePhotoId: {
|
||||
type: DataTypes.UUID,
|
||||
allowNull: true
|
||||
}
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: "identities",
|
||||
timestamps: true
|
||||
}
|
||||
timestamps: true,
|
||||
},
|
||||
);
|
||||
|
||||
return Identity;
|
||||
|
||||
Reference in New Issue
Block a user