| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- /// OA 模块数据库枚举常量。
- ///
- /// PRD/Database §6 枚举取值统一维护点。
- /// 枚举值(value)与数据库 VARCHAR 存储值一致,
- /// labelKey 为 i18n 键,前端展示通过 `l10n.get(labelKey)` 获取。
- class EnumEntry {
- final String value;
- final String labelKey;
- const EnumEntry(this.value, this.labelKey);
- }
- // ═══════════════════════════════════════════
- // §6.1 单据审批状态
- // ═══════════════════════════════════════════
- class ApprovalStatus {
- ApprovalStatus._();
- static const draft = EnumEntry('draft', 'draft');
- static const pending = EnumEntry('pending', 'statusPending');
- static const approved = EnumEntry('approved', 'statusApproved');
- static const rejected = EnumEntry('rejected', 'statusRejected');
- static const withdrawn = EnumEntry('withdrawn', 'statusWithdrawn');
- static const completed = EnumEntry('completed', 'completed');
- static const returned = EnumEntry('returned', 'returned');
- static const values = [draft, pending, approved, rejected, withdrawn];
- }
- // ═══════════════════════════════════════════
- // §6.2 付款状态
- // ═══════════════════════════════════════════
- class PaymentStatus {
- PaymentStatus._();
- static const unpaid = EnumEntry('unpaid', 'statusWaitPay');
- static const paid = EnumEntry('paid', 'paid');
- static const values = [unpaid, paid];
- }
- // ═══════════════════════════════════════════
- // §6.3 费用大类(ExpenseTypes)
- // ═══════════════════════════════════════════
- class ExpenseType {
- ExpenseType._();
- static const travel = EnumEntry('travel', 'filterExpenseTravel');
- static const entertainment = EnumEntry(
- 'entertainment',
- 'filterExpenseEntertainment',
- );
- static const procurement = EnumEntry('procurement', 'expenseTypeProcurement');
- static const activity = EnumEntry('activity', 'expenseTypeActivity');
- static const office = EnumEntry('office', 'filterExpenseOffice');
- static const meeting = EnumEntry('meeting', 'filterExpenseMeeting');
- static const training = EnumEntry('training', 'expenseTypeTraining');
- static const values = [
- travel,
- entertainment,
- procurement,
- activity,
- office,
- meeting,
- training,
- ];
- }
- // ═══════════════════════════════════════════
- // §6.4 紧急程度
- // ═══════════════════════════════════════════
- class Urgency {
- Urgency._();
- static const normal = EnumEntry('normal', 'normal');
- static const urgent = EnumEntry('urgent', 'urgent');
- static const critical = EnumEntry('critical', 'filterCritical');
- static const values = [normal, urgent, critical];
- }
- // ═══════════════════════════════════════════
- // §6.5 交通工具
- // ═══════════════════════════════════════════
- class TransportType {
- TransportType._();
- static const plane = EnumEntry('plane', 'transportPlane');
- static const highSpeedRail = EnumEntry(
- 'high_speed_rail',
- 'transportHighSpeedRail',
- );
- static const train = EnumEntry('train', 'transportTrain');
- static const selfDrive = EnumEntry('self_drive', 'transportSelfDrive');
- static const values = [plane, highSpeedRail, train, selfDrive];
- }
- // ═══════════════════════════════════════════
- // §6.6 招待层级
- // ═══════════════════════════════════════════
- class EntertainmentLevel {
- EntertainmentLevel._();
- static const normal = EnumEntry('normal', 'normal');
- static const important = EnumEntry('important', 'important');
- static const vip = EnumEntry('vip', 'entertainmentVip');
- static const values = [normal, important, vip];
- }
- // ═══════════════════════════════════════════
- // §6.9 加班类型
- // ═══════════════════════════════════════════
- class OtType {
- OtType._();
- static const workday = EnumEntry('workday', 'workdayOvertime');
- static const weekend = EnumEntry('weekend', 'weekendOvertime');
- static const holiday = EnumEntry('holiday', 'holidayOvertime');
- static const values = [workday, weekend, holiday];
- }
- // ═══════════════════════════════════════════
- // §6.10 补偿方式
- // ═══════════════════════════════════════════
- class CompensationType {
- CompensationType._();
- static const overtimePay = EnumEntry(
- 'overtime_pay',
- 'compensationOvertimePay',
- );
- static const compLeave = EnumEntry('comp_leave', 'compensationCompLeave');
- static const mixed = EnumEntry('mixed', 'compensationMixed');
- static const values = [overtimePay, compLeave, mixed];
- }
- // ═══════════════════════════════════════════
- // §6.11 用车目的
- // ═══════════════════════════════════════════
- class VehiclePurpose {
- VehiclePurpose._();
- static const reception = EnumEntry('reception', 'customerReception');
- static const business = EnumEntry('business', 'businessTrip');
- static const official = EnumEntry('official', 'official');
- static const values = [reception, business, official];
- }
- // ═══════════════════════════════════════════
- // §6.14 公告分类
- // ═══════════════════════════════════════════
- class AnnouncementType {
- AnnouncementType._();
- static const notice = EnumEntry('notice', 'noticeAnnouncement');
- static const policy = EnumEntry('policy', 'hrPolicy');
- static const activity = EnumEntry('activity', 'holidayActivity');
- static const values = [notice, policy, activity];
- }
|